Skip to content

REFACTOR LocatorController index() - remove getTrigger() check for loading Locations on page load  #219

@jsirish

Description

@jsirish

Is your feature request related to a problem? Please describe.
The getTrigger() was meant to prevent locations from loading on page load, by checking if the GET variable was set for the field marked as query_trigger. The ability to not load all location results prior to a search is to ensure performance with a larger set of Locations (100+).

The getTrigger() method is more complicated than it needs to be.

Describe the solution you'd like
In index(), replace the getTrigger() check with a check against a $db boolean on Locator class that can be set via the CMS. Default is false. If marked true, all results would display on initial page load.

Describe alternatives you've considered
Instead adding a config via yaml to set default behavior for the class. This offers less flexibility without subclassing Locator so the config can be different.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions