Filtering entries by grid field with search:results tag
Hi,
I was hoping to be able to show only those entries that contain a certain value from a grid field. I have the value in the url and I'm using the search parameter in the search:results tag but it's returning all results instead. Any ideas?
Thanks
{exp:low_search:results search:cyber-presenters:last="{freebie_5}" channel="cyberseminars" dynamic="no"}
{/exp:low_search:results}
Replies
Low 24 May 2017 18:18
Is the name of the grid field "cyber-presenters"?
And is the grid column you're targeting "last"?
If you enable the template debugger and look up all lines that mention Low Search, what does that say?
James Woodman 24 May 2017 18:47
Hi Low,
Yes, that's correct. Here is a screenshot of the template debugging. Seems to be working.
Low 24 May 2017 18:50
In the Low Search settings, is the Field Search filter enabled?
James Woodman 24 May 2017 19:03
It was not. That did the trick. Thanks so much!
One more question for you. I need to output a select menu of all the presenters (only one) in alpha order by last name. I'm doing it this way now but the names are displaying multiple times because the presenters have multiple entries and I can't get them to order alpha by last name. Is there a better way with one of the low search tags?
Browse by Presenter
{exp:low_search:results channel="cyberseminars" dynamic="no" orderby_sort="cyber-presenters:last|asc" disable="categories|member_data|relationships|pagination"}
{cyber-presenters sort="asc" orderby="last"}
{cyber-presenters:first} {cyber-presenters:last}
{/cyber-presenters}
{/exp:low_search:results}
Thanks again!
Low 24 May 2017 19:14
That's outside the scope of Low Search, really. You'd need to use the Query module to generate such a list.
James Woodman 24 May 2017 19:17
Ok, thanks for your help.