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

Support archive

Can I pass the category ID from a page URL through Low Search?

Karen 9 Mar 2015 00:43 question, complete

I've got a site that depends a lot of pages where the user is clicking on a link from a list of categories to get to an informational page. One of these informational pages shows a list of Low Events entries for that category. Is it possible to set up that page with a Low Search form as well, and have the category "remembered" even if the user does another search on that initial page?

For example - user clicks on the team "Football" from a list of category links, and gets to the category page for Football. I have a Low Search Entries list defaulting to only show upcoming events. Can I also have a Form tag with from/to dates above the entries list, where the user can see events from a previous date range, but have that form "remember" the category Football?

I figured that my results tag needs category="{last_segment_category_id}" to only show initial events for Football, but I can't figure out how to have the form tag 'remember' that for a new date range.

Possible? Or better to just go to a new page if the user wants to find football events with a different date range than just upcoming?

Thanks!

Replies

  1. Low 9 Mar 2015 09:13

    Certainly. You could add the category parameter as a hidden input field in the form:

    <input type="hidden" name="category" value="{last_segment_category_id}">

  2. Karen 9 Mar 2015 13:25

    Great, thought so! Thanks!