Topic Filtering
Can Low Search over the functionailty to allow users to filter by topic as seen here: http://www.maternal-and-early-years.o...
Many thanks
Can Low Search over the functionailty to allow users to filter by topic as seen here: http://www.maternal-and-early-years.o...
Many thanks
Replies
Low 11 Jul 2011 13:09
Hi!
Basically, if you can filter entries using the regular {exp:channel:entries} tag, you can do it with the {exp:low_search:results} tag, too. In this case, you could treat topics as EE categories, and create URLs like this:
mysite.com/search/results/XXX
...where XXX is the encrypted search query. You could then create dynamic filters by listing out categories and creating links like this:
mysite.com/search/results/XXX/123
...where 123 is the category ID. You could then feed this to the search results tag, like this:
{exp:low_search:results query="{segment_3}" category="{segment_4}"}
...
{/exp:low_search:results}
The only thing that isn't possible now, is to get a result count for each category, like in the example site you linked.
goodaa 11 Jul 2011 13:14
Wow thanks for getting back so quickly!
Even though we cannot add a result count we should be able to switch each topic off and on regards filtering?
Low 11 Jul 2011 13:23
The way I explained it would just filter by one topic/category at a time. If you want to filter by multiple categories, you'd need to submit the search form again, but use either a multiple-select box or checkboxes for the categories. So, in your search form, you'd have to add something like:
{exp:channel:categories}
<label><input type="checkbox" name="category[]" value="{category_id}" /> {category_name}</label>
{/exp:channel:categories}
goodaa 11 Jul 2011 13:28
Ok, thanks for the reply!