I wonder if there is a way to have collapsible grouping (or at least normal grouping) in exposed filters, like in CCK module. Ιf you have many filters in a view, this feature would be useful.
I am not sure if current version of views supports this, that's why i tagged it as a support request.
Comments
Comment #1
dawehnerThe exposed forms are pluggable, so it would be able to write a plugin which makes this possible.
This plugin can live in contrib somewhere else, so views keeps clean.
dagmar1 wrote already some stuff with exposed form plugin.
Comment #2
esmerel commentedComment #3
sotiris commentedDo we have some new plugin and we changed the status?
Comment #4
dagmarYou can wrap all the views-exposed-form.tpl.php template into a collapsible fieldset using this template: more info here: http://drupal.org/node/118343#comment-1442786
Comment #5
merlinofchaos commentedSorry, a support request does not indicate that we will create a new plugin for your use case. If we tell you how to accomplish something in a support request, it can be mark fixed. Given the number of possible plugins that are out there, you may rest assured that the vast majority of minor use cases will not have new plugins created for Views that will ship with it.
The whole reason Views is pluggable is so that when Views doesn't do something you need it to do, but it is possible with a plugin, you can write the plugin for your purposes. You can use it just on your site or release it as a module.
Comment #6
sotiris commentedDagmar thank you for your help!
@Merlin I thought that something can be marked as fixed only when we have some solution that actually works (in our situation some plugin). But as you said we can consider something fixed if we have the ability to build it, thanks for clarifying this.
Comment #9
MaxPalpatin commentedI can't open the page http://drupal.org/node/118343#comment-1442786
"Access denied
You are not authorized to access this page."
Should I be the member of some group or else?
Comment #10
SeanA commentedAlso can be put in views-view.tpl.php:
Comment #11
mike27 commentedFor anyone who's interested, if you want to implement this in drupal 7 here is a working example:
Comment #12
mrweiner commentedThanks for the D7 version, but does anybody know how to go about keeping the default classes available for each exposed filter? It's great having the fieldset, but not being able to move each filter around individually isn't exactly optimal.
Comment #13
brandy.brown commentedSo #11 worked great for me. However, does anyone know how to make the fieldset collapsed by default?
Comment #14
brandy.brown commentedComment #15
mrweiner commentedYou should be able to just add "collapsed" into the fieldset class beside "collapsible."
Comment #16
brandy.brown commentedperfect. thanks!
Comment #17
malancheril commentedThis almost works for me. The text in the legend doesn't do anything when clicked. Adding the class "collapsed" will collapse my exposed filters but clicking on the legend doesn't open or close it. Any ideas?
*Update* Turned off the Superfish module and it worked. Any ideas what could be causing that?
Comment #18
finex commentedThere is one problem with the suggested solution for D7: if you add the "collapsed" class, when the page reload the filter is collapsed, but when at least a filter is selected it should be better to display the exposed filters (from a usability point of view).
A solution would be to conditionally add the "collapsed" class counting the number of $_GET parameters:
I hope it will be useful.