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

Support archive

Filter list showing only active (collections returning at least one result) items

Andrew 9 Jan 2014 12:33 question, complete

I have a search results page with with a list of filter items (corresponding to the search collections i've set up). Is it possible to tell which collections have no results for the particular query so that I can hide / disable the relevant filter options?

Replies

  1. Low 9 Jan 2014 12:57

    Alas, this remains an issue, specifically with paginated search results. Currently, there's no way for me to get a list of *all* entry IDs that are part of a result set. Therefore, it's not possible to generate filter parameters based on that result set either. It's a restriction in EE's current API.

    If you're not paginating results, using JavaScript would be the way to go: adding classes to each results and show/hide filters based on the presence of those classes.

  2. Andrew 9 Jan 2014 14:17

    Thanks for the speedy response...

    I thought that might be the case from reading previous posts, just wanted to check. As I'm using paginated results, I'll have to let the clients know that we won't be able to do this at present.

    Cheers,
    Andy