Refining search results - not checking collections.
What I would like to do is offer a simple search box initially, and then on the results page, give them an opportunity to filter it. I've been using the examples found at http://gotolow.com/addons/low-search/... to give them the ability to filter by collections, change the sort order, and auto populate a new search box on the page so they can filter and just hit "search". The problem I'm running into is on the initially "checking" of the collection boxes.
I'm searching in every collection so one would think that when I initially hit the results page (after doing a search) all the collection boxes would be checked (as they are all active), but none of them are.
If I do a filtered search from the results page, it DOES check the boxes correctly, but not when I'm going from a simple search box to the results page and then displaying the filters for the first time.
Is there any way to do this?
Replies
Low 21 Apr 2014 14:30
This is intended behaviour. When not defining a collection and searching by keywords, you're using all collections (basically, not filtering by collection). It's the same with the native channel="" parameter: when left out, all channels will be searched.
You could add an option on top with "All collections" which returns an empty string, or check the collection checkbox when the {low_search_collection} var is empty.
Jason Boothman 21 Apr 2014 15:26
Checking to see if the {low_search_collection} var is empty did the trick.
Thank you very much!