Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Problem/Motivation
Slider facets do not display the title of the facet.
Proposed resolution
Long-term: having these widgets implement templates (similar to list facets) is desirable. Quick solution: add a render element to the widget that (optionally) displays and wraps the title in h3 tags.
Comment | File | Size | Author |
---|---|---|---|
#6 | 3002580_6.patch | 1023 bytes | mpp |
#2 | slider_facet_titles-3002580-2.patch | 802 bytes | JacobSanford |
Comments
Comment #2
JacobSanfordQuick patch for those needing a fix
Comment #3
JacobSanfordComment #4
Nick Hope CreditAttribution: Nick Hope commentedThe patch in #2 works for me. Thanks a lot!
Comment #5
mpp CreditAttribution: mpp at AmeXio, District09 for District09 commentedAdding a render element seems like a quick workaround.
SliderWidget::build should probably return the same theme render array as WidgetPluginBase::build, namely
So SliderWidget::build should first call it's parent build.
Comment #6
mpp CreditAttribution: mpp at AmeXio, District09 for District09 commentedThis is a different approach where I call the parent::build() so that I'm sure the output uses the same theming.
Comment #7
borisson_I really like the approach in #6. If we can get that one veryfied by someone else I'd be happy to take that in.
Comment #8
Nick Hope CreditAttribution: Nick Hope commentedThe patch in #6 works for me. I patched 8.x-1.1 and tested with a range slider widget in D8.6.2. Thanks very much mpp.
Comment #9
borisson_Awesome, setting this to rtbc.
Comment #11
borisson_Thanks for that validation @Nick Hope! Committed and pushed the patch