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

Support archive

Display Search Keyword/Filter

Sean 11 May 2015 16:01 problem, complete

I've got Low Search working and filtering correctly, however I now need to display the filter on the results page.

What I have now is:

 
{if segment_2==""}
All Branches
{if:else}

{exp:low_search:param:loop get="keywords" as="keywords" query="{segment_3}" format="raw"}
param{keywords}
{/exp:low_search:param:loop}

keywords{exp:low_search:keywords query="{segment_3}"}

{/if}


As you can see I've tried both low_search:keywords and low_search:param:loop but i'm not getting any results. The page is filtered by the following code - there are two of these performing different filters

 
{exp:low_search:form query="{segment_3}" result_page="{transcribe:language_abbreviation}/branch-locator/filter" form_id="region-filter" form_onchange='submit()'}

{exp:channel:entries
channel="regions"
dynamic="no"
orderby="title"
sort="asc"
disable="categories|member_data|pagination|custom_fields"
}
{if count=="1"}All ({total_results}){/if}

{title}

{/exp:channel:entries}

{/exp:low_search:form}

Replies

  1. Low 11 May 2015 22:18

    If you want to display the keywords inside the Results, Form or Filter tag, you can just use {low_search_keywords}.

    If you want to display them outside those tags, you should be able to use the low_search:keywords tag.

    However, I can't see the HTML of your form tag, so you might not even have a keywords filter there. Can you re-paste your code? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.

    Also, what's the encoded query for such a page?

  2. Sean 11 May 2015 23:24

    Low,

    The pastie is here: http://pastie.org/private/rwyd8xidn0h...

    the encoded query is a result of the second block which is creating the filter from a channel entries tag.

    Will send you a link to the dev site via email so you can better see what I mean. I may not be explaining it well.

    Appreciate your time/effort on this.

  3. Low 12 May 2015 07:14

    As per your pastie, you're not using the Keywords filter, so you can't display keywords.

    You're using the parameter child:pl_branch_region to filter entries, so you can output its value using {low_search_child:pl_branch_region}. This will output the selected entry_id. If you need to output the title, feed it to a channel:entries tag.

  4. Sean 12 May 2015 13:35

    Thanks Low,

    I got it working now.