I added a theme override function called phptemplate_views_filterblock in order to get custom CSS IDs for each of the fieldsets in which the view's exposed filters are contained.

I copied the function's code exactly as it was in the module, adding to the first loop (foreach ($view->exposed_filter as $count => $filter) ) the following line:

'#attributes' => array('id' => 'filter-' . $count), // giving each fieldset a unique div id

Would you consider adding that to the next version of the module? Also, would there be an easy way to get the items inside the fieldsets to also have id's? That way, theming them would be ridiculously easy.

Thanks again for the great module!

Comments

EvanDonovan’s picture

Priority: Normal » Minor

Today I tried taking the theme override function I wrote out of the template.php file so that I could have it in a separate file & keep template.php from getting too long. I tried to use the _phptemplate_callback function as per www.drupal.org/node/11871, but I wasn't able to get it to work.

Strangely, even after I deleted the top line (the one which said function phptemplate_views_filterblock) and deleted the closing }, it behaved differently than it had in the template.php file. It wasn't rendering the fieldsets at all.

This is why it would be nice to have the #attributes set in the module itself, so that I wouldn't have to clutter the template.php any more than necessary :) However, it's not a big issue, so I changed the priority to minor.

inforeto’s picture

Is there a way to call phptemplate_views_filterblock for a specific view?
The phptemplate_views_display_filters_YOUR_VIEW($view) doesn't work for blocks.

pomliane’s picture

Status: Active » Closed (won't fix)

This version of Views Filter Block is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.