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.
Added a facetapi radio button widget plugin.
Only makes sense if you apply this patch as well, which adds a per-facet setting that allows only one item to be active at a time.
#1393928: Add a per-facet setting that allows only one item to be active at a time
Comment | File | Size | Author |
---|---|---|---|
#15 | facetapi_bonus-radio-widget-2034777-15.patch | 4.96 KB | thewilkybarkid |
#13 | facetapi_bonus-radio-widget-2034777-2d.patch | 4.93 KB | filsterjisah |
#9 | facetapi_bonus-radio-widget-2034777-9.patch | 4.74 KB | jsacksick |
#8 | facetapi_radio.inc_.txt | 5.46 KB | Johann Wagner |
#8 | facetapi_radio.module.txt | 1.28 KB | Johann Wagner |
Comments
Comment #1
fagoLooks like the patch contains shell control characters?
Re-rolled patch. It probably makes sense to commit this one once #1393928: Add a per-facet setting that allows only one item to be active at a time landed.
Comment #2
maximilianmikus CreditAttribution: maximilianmikus commentedok fixed the patch, the patch from fago was missing changes in the .info file.
Comment #3
vintorg CreditAttribution: vintorg commentedI just rolled patch #2. Are there supposed to be 2
facetapi_bonus_facetapi_widgets()
functions? I assume not.Comment #4
vintorg CreditAttribution: vintorg commentedAlso, issue with the .info file. I had to add the line by hand.
reject file:
Comment #5
vintorg CreditAttribution: vintorg commentedI added the array elements together in facetapi_bonus_facetapi_widgets. The radio buttons are now displaying!
1. On the filters tab, I keep getting the following errors, even if I don't select any options:
Contained fields field is required.
Contained fields field is required.
2. On global settings, I have the the "Limit to one active item" checked, and I have "Hide active items" unchecked in the facet's active filters. However, when I select an option (these are taxonomy terms), the rest of the items hide. I want all the items to display, even if not active. How do I configure that?
Comment #6
nlambert CreditAttribution: nlambert commentedFor others looking, this patch required #1393928: Add a per-facet setting that allows only one item to be active at a time which has been committed and is now included in the current facetapi version 1.5
In the display settings for the given facet, you must check "Limit to one active item"
@vintorg
I am not experiencing the errors mentioned in #1, but I believe you must change the "Minimum facet count" setting.
Comment #7
Johann Wagner CreditAttribution: Johann Wagner commentedPatch #2 works great with version 7011.
Thank you.
Comment #8
Johann Wagner CreditAttribution: Johann Wagner commentedI needed "real" radio buttons and also reduce JS to only auto-submit the form.
Though the patch #2 is working, without Javascript the link widget is displayed.
Please find attached a new widget that uses the FAPI's radios element instead, and that could be included to FacetAPI Bonus.
Unfortunately I've no time to make a patch, but the module file is short and self-explanatory.
Comment #9
jsacksick CreditAttribution: jsacksick commentedPatch rerolled against latest dev, when you download the module via drush, the patch won't apply because of the .info modification, a possible workaround would be to add the class on top of the others...
Comment #10
selva8187 CreditAttribution: selva8187 commentedPatch #2 working great. Thank you fago.
But One correction in that patch js file call : /js/facetapi_bonus_widget_links_radio.js
Comment #11
filsterjisah CreditAttribution: filsterjisah for District09 commentedI've tried to use patch from #2 via drush make but the patch failed to apply.
Therefor attached a "valid" one.
Comment #12
filsterjisah CreditAttribution: filsterjisah for District09 commentedComment #13
filsterjisah CreditAttribution: filsterjisah for District09 commentedThird ftw... This patch applies to version 1.1.
Comment #14
nareshbw CreditAttribution: nareshbw commentedThanks Fago ,
Patch#2 is working for me.
Comment #15
thewilkybarkid CreditAttribution: thewilkybarkid commentedSame as #13, but have fixed CSS selector for fields through entity references.