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.
On my site I have a taxonomy vocabulary with image fields attached to terms. I'd like to be able to render exposed filter as checkboxes with corresponding images attached.
I've overridden theme_select_as_checkboxes() and bef_checkbox() functions in template.php in my theme. It works, but looks quite ugly.
Is it possible to come up with a more elegant solution?
Comments
Comment #1
mikeker CreditAttribution: mikeker commentedMy first impression is that this is a Views issue -- you need to be able to add fields to the display of an exposed filter. But I'm guessing that has as much chance in the Views queue as a snowball in hell... My concern in adding this to BEF is that it's starting to get outside the scope of the project and it would open up a huge can of (support) worms that I don't have the time to deal with right now.
Can you attach what your overridden theme_select_as_checkbox and bef_checkbox() routines? I'd like to see what you did before I dismiss all chances of fixing this... Thanks.
Comment #2
akamaus CreditAttribution: akamaus commentedWell, theme_select_as_checkbox was only changed to call my own version of bef_checkbox().
Here it is:
BTW, it's offtopic, but 'name' attribute is being rendered two times for each
<input>
element.Comment #3
Les LimJust opened a related issue here: #1404656: Turn bef_checkbox() into a registered theme function
Comment #4
mikeker CreditAttribution: mikeker commentedIssue queue cleanup... My apologies for taking so long to address this issue!
I'm sorry, but this is outside the scope of BEF. @Les Lim, a revamp of the theme side of BEF is on my radar, but it's not going to be in the near future. At this point, it may end up being part of the 8.x port.
Thanks!