0

Here is what I have as a working example of exp:low_search:filters tag on the result page and this works just fine. One can click on a category to show or hide entries for that particular category. Just wondering if the same can be done with collections? I mean can we show all the collections found in the query on the results page to filter results?

{exp:low_search:filters query="{segment_3}"}
  {exp:channel:categories channel="video" style="linear" category_group="11" parent_only="yes"}
   {if count ==  1}<ul class="category-filters">{/if}
     <li style="color: #fff;font-size: 20px;">
       <a class="btn btn-small" style="vertical-align: text-top;" href="{low_search:url toggle:category="{category_id}"}">
        {if category_id IN ({low_search_category})}
        <i class="icon icon-check red-icon" style="font-size: 160%;vertical-align: middle;"></i> {/if} {category_name}
       </a>                      
      </li>
    {if count == total_results}</ul>{/if}
  {/exp:channel:categories}               
{/exp:low_search:filters} 

Any help would be appreciated.

1

That's totally possible. Use the same principle as with categories, but using the {collection} variable pair to generate the collections. Pop this inside your Filters tag:

{collections}
    <a href="{low_search:url toggle:collection="{collection_name}"}">{collection_label}</a>
    {if collection_is_active}&check;{/if}
{/collections}
3
  • That's totally awesome. It's everything I hoped for! Worked like a charm. Much gratitude to you for this prompt response. – Ahmed Bashir Tahir Oct 13 '13 at 19:39
  • Low! Just one more favor. Can we limit collections to only those for which the results are found? Currently it shows all the collections I included in the first place within low_search:form. Edit-- Can we use each and every parameter of the form tag in the same fashion? – Ahmed Bashir Tahir Oct 13 '13 at 19:41
  • That limit isn't possible at the moment, I'm afraid. You could show/hide them using the {collection_is_active} conditional. And yes, any parameter can be used with the toggle:-syntax. – Low Oct 14 '13 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.