All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Filtering results by collection and the channel search parameter

Stephen 1 Apr 2015 16:23 question, complete

Hi Low,

I've got a keyword search that searches in three different collections: ls_static, ls_news and ls_winners

For one of the collections (ls_winners), I only want entries to be outputted in the results if one of the custom fields in that channel equals a certain value. So I added a channel search parameter for this field (cf_schemes_overall_result) into the results tag as a parameter:

{exp:low_search:results query="{segment_3}" limit="10" paginate="both" disable="categories|category_fields|member_data" collection="ls_static|ls_news|ls_winners" status="open" search:cf_schemes_overall_result="Special Award|Award|Commendation"}

But it is now only outputting results from the ls_winners collection as that's the only collection that contains that field.

Is there a way I can output results from all three collections, and make results from only the ls_winners collection adhere to that search filter for the cf_schemes_overall_result field?

Thanks,

Stephen

Replies

  1. Low 1 Apr 2015 16:41

    Yes. Check out the smart_field_search parameter.

  2. Stephen 2 Apr 2015 10:05

    Thanks Low, that worked great! :-)