Should low_search_catch_search get fired when using low_search:url?
I'm using the low_search_catch_search hook to add a list of entry_ids to certain searches. This works great when using the form.
Within my search results, I'm using {exp:low_search:url} to create links to new searches for that particular thing (not toggling, or filtering within the existing results). This works for things like authors, categories, etc.
However, I'm finding that low_search_catch_search is not being fired for these {exp:low_search:url}-generated searches - hence my custom search parameters are not being added.
Is this intentional, or an oversight?
Replies
Low 17 May 2013 09:26
Yeah, this is intentional. The Catch Search hook only fires if a form was submitted (or the Action URL is called). If you want to have custom parameters and filters for Low Search, you're probably better off using the low_search_pre_search hook.
That will give you all parameters given. You can read out your custom parameters, execute a filter based on those params, and set the entry_id="" param accordingly.
Using that hook will ensure you can use the custom params in the URL tags and in the Results tag itself, too.
Derek 17 May 2013 12:26
Perfect, worked as expected. Thanks. Love this add-on.