Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a use case where we would like users to be able to select multiple checkbox options to filter results further. This would also require that all the options remain visible after one is checked rather than them all going away after one option is checked.
See this site for an example of what I'm talking about:
http://deseretbook.com/LDS-Audio/c/4
There are also facets on amazon.com that function in a similar way but without the ajax.
Comments
Comment #1
cpliakas CreditAttribution: cpliakas commentedLooking through the link you provided, it appears to me that the OR operator is required for the facet instead of the default AND. If the implementing search module you are using supports OR facets, you will have an option in the "Global settings" fieldset located in the bottom left hand corner of the facet's display settings form. If there isn't an option, either the backend doesn't support OR facets in general or for that particular facet.
Thanks,
Chris
Comment #2
deggertsen CreditAttribution: deggertsen commentedWow! That makes me feel like an idiot. It works perfectly! Thanks so much for your quick reply.
Comment #3
cpliakas CreditAttribution: cpliakas commenteddeggertsen,
Haha. Nah, you don't know unless you ask. There are 5,000,000 configuration options in Drupal, and you simply can't know where every one is and what it does. But now you have one more in your tool belt.
Thanks for posting.
Chris
Comment #5
lefeed CreditAttribution: lefeed commented@deggertsen
Which search module are you using? I'm desperately trying to do that!
Thanks!
Comment #6
deggertsen CreditAttribution: deggertsen commentedI believe the reason why I didn't see it initially and I posted this issue is because I was using the drupal database which simply wont work due to limitations in mysql. Once I switched to using a solr server for it, the option was available and now works just great. There is a great service that can help you get a solr server up and running here: http://www.mysolrserver.com/
I assume that that is your issue, but if not let me know and I'll see if I can help.
Comment #7
hanish keloth CreditAttribution: hanish keloth commentedCould you please explain to me how to integrate Facet API for multi select checkbox search.
Comment #8
deggertsen CreditAttribution: deggertsen commented@hanish keloth
You may want to open a new issue requesting documentation if it isn't already available for what you are asking. Also, you should be more specific as I'm really not sure what you are asking. Have you read the documentation for facet API? As far as I'm concerned cpliakas answer this in #1.
Comment #9
benjaminkyta CreditAttribution: benjaminkyta commentedHi
Am displaying a map of locations which are linked to Activities. Each Activity belongs to a given sector. I have a facet for Sectors. Right now the map just shows all locations despite the sector of a related Activity.
I need to have all the sectors in the Sector facet checked by default. That way only locations of Activities with a sectors will show up. Do you any idea how to implement this?
Note; Location is a different entity linked to an Activity via CER(Corresponding Entity References). And sector a Term reference field (Multi-value ) on the Activity content type.
Thank you