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

Support archive

Filter entries by several category groups and categories, statuses and custom fields

atlelill 13 Dec 2012 11:07 question, complete

I have a monster-task: a channel full of articles categorized in several groups, different statuses and some custom fields (type: active/not active).

I want the user to pick and choose in a form and then display only the articles that meet all the criteria.

I've tried using dynamic parameters, but it seems I can't get the "&" delimiter to work across the form. I suspect my query looks like this:

cat-group-1-cat#&cat-group-1-cat#|cat-group-2-cat#&cat-group-2-cat#
(notice the '|' in the middle, giving me back more results than I want...)

Is this something I might be able to do with Low Search? So far I've only used it in the traditional way with keyword-searches, with great success!

Replies

  1. Low 13 Dec 2012 11:20

    You can generate parameters like this: category="1|2|3" and category="1&2&3". The first will return all entries that have category id 1, 2 OR 3; de second will only return entries that have ALL THREE categories assigned. The category ids can belong to multiple groups.

    What Low Search cannot do at the moment is something like entries that have 1 & 2 OR 3 & 4; as that's combining the OR/AND operator.

    Having support for that is on my todo list (well, to investigate, anyway).

  2. atlelill 18 Dec 2012 09:11

    Low, I'm almost in tears of joy! I have struggled with dynamic parameteres, Dynamo, and all sorts of filtering problems for almost half a year, and it turns out everything was working after a short hour playing with Low Search! Thank you, thank you, thank you!!!!

    On a more serious note: using the search parameteres search_mode="exact" and require_all="category"
    was all it took. I also have a few radio-button options, which I just named "search:custom_field_name" respectively. Low Options allowed me to filter by a select dropdown too.

  3. Low 18 Dec 2012 09:18

    Glad you like it, Atle. As a sidenote, the search_mode="exact" only applies to keyword searches. It has no effect if you're just filtering by parameters (like category and search:custom_field_name).