1

what I am trying to achieve is to filter the site's search results and produce results of 5 content types. Search API has helped me do that and very well I must say. There is one more thing though that I need to do and I am wondering it already supports such behaviour and/or if it can be solved by theming OR if I have to create a custom solution; so here it is:

Say my aforementioned content types are: Alpha, Bravo, Charlie, Delta, Echo. I want my facets to be produced in this manner:

  • All (23)
  • Alpha (10)
  • Bravo (4)
  • Charlie (0)
  • Delta (1)
  • Echo (8)

So what i need furthermore than the options your module provides is the "All" option as long as showing Facets which yielded no results.

Apart from that, I also need to bypass the "filter-like" functionality the module provides by default, where I have to click the "-" sign next to the link to go back to the main selection, and make clicking the link filter the results while leaving the other options there for clicking. So if I was to switch from "All" to "Bravo" i'd just had to click Bravo, something like a contextual filter of Content Types in a View, oh and yes, my results are in a view-page.

Thanks in advance.

1 Answer 1

1

In the end I did all of this with jQuery alone.

I created a block that contains the

  • All (23)
  • Alpha (10)
  • Bravo (4)
  • Charlie (0)
  • Delta (1)
  • Echo (8)

options, I add the number with jQuery by counting the grouped results, and by JQuery again, I hide the appropriate grouping blocks. So the Facet API block was of no use to me and neither was the View's exposed filter.

1
  • 1
    It would be better if you can explain how you achieved your needs.
    – user4081
    Jul 18, 2012 at 11:18

Your Answer

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