It would be great to have the id of the filter on the wrapper block of the exposed filter by default, so we don't have to create a views-exposed-form.tpl.php file in all our themes where we want to do certain css tricks with the exposed filters. It would just involve changing line 28 of views-exposed-form.tpl.php to print the id as well, which is already accessible at that point:

<div class="views-exposed-widget <?php print $id ?>">
CommentFileSizeAuthor
#2 727894.patch615 bytesstella

Comments

dawehner’s picture

Could you fill a patch? This would be cool..

stella’s picture

Status: Active » Needs review
StatusFileSize
new615 bytes

This can be easily accomplished via a overriding theme template file, but in case others would also find it useful, see attached.

Cheers,
Stella

dawehner’s picture

Version: 6.x-2.8 » 6.x-2.x-dev
Status: Needs review » Reviewed & tested by the community

Looks fine. And applies also to 3.x

Now the only question is, do we need this extra css class, or should the users put them in their own theme.

merlinofchaos’s picture

Hmm. Is $id sufficient to be a class? That's going to be the raw id, isn't it? Shouldn't it be views-widget-$id ?

stella’s picture

hmmm views-widget-$id probably would be better alright.

merlinofchaos’s picture

Status: Reviewed & tested by the community » Fixed

Committed with the change to views-widget-$id

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.