Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
The widget "link" for better exposed filters doesn't add the "selected" class to a link when a views page is being visited without the GET parameters in the URL.
The view is correctly filtered though (with the filtersettings remembered from last visit). The user just isn't able to see the former filter settings and might think that no filtering is being applied.
Comments
Comment #1
brzbg CreditAttribution: brzbg commentedSubscribed
Comment #2
garbo CreditAttribution: garbo commentedI never solved this with BEF. I used Global Filter instead. Just so you know!
Comment #3
brzbg CreditAttribution: brzbg commentedI found a solution (the second way)
http://www.paulund.co.uk/use-jquery-to-highlight-active-menu-item
Comment #4
mikeker CreditAttribution: mikeker commentedIssue queue cleanup... Sorry for not getting to this one earlier!
Based on #3, I'm closing this as won't fix as there seems to be a workaround. If you're still experiencing the original issue, please reopen with specific steps to reproduce.
Thanks.
Comment #5
thomas1977 CreditAttribution: thomas1977 commentedReopening this. Not sure #3 solves everything here (for instance: how do you limit the '.active' class to apply only to the exposed filter and not all other links on the page?).
@ brzbg
How did you make it work? Could you please give a step-by-step instruction? I'm no coding eagle here :-)
Best,
Thomas
Comment #6
thomas1977 CreditAttribution: thomas1977 commentedComment #7
jjmackow CreditAttribution: jjmackow commentedyou can emulate your desired results by doing some styling on the BEF and radio/checkbox options. Checkbox uses the 'input' and 'label' tags set within a 'div' tag with a class called 'form-item'. style them like so (the sassy way):
note that the input tag is hidden and the label tag is used within the UI to select the option. the :checked psudo is your active option within the set of selections. I set them up as buttons with rounded corners in my intefaces.
Comment #8
Road Kill CreditAttribution: Road Kill commentedIf anyone needs an active state on Better Exposed Filters links.
.bef-select-as-links.jquery-once-2-processed a.active {
color: #33cc00 !important;
}
Comment #9
jkopel CreditAttribution: jkopel as a volunteer and commentedIt looks like there are multiple reasonable options available here, and there is no reason for BEF to have an opinion on how your links/form elements should be styled.
If there are additional classes that would be useful to add to links or form elements please feel free to reopen this and supply a patch to that effect.
Thanks!