Closed (fixed)
Project:
Views (for Drupal 7)
Version:
6.x-2.0-beta3
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 May 2008 at 15:25 UTC
Updated:
14 Jan 2012 at 00:14 UTC
Hi,
Having successfully learnt to theme views output, I turn my attention to input. How do you customize/theme an exposed filter? I have an exposed search: search terms filter, but the input box is too narrow for my liking. Is this a simple matter and, if so, how do I go about doing it?
Comments
Comment #1
merlinofchaos commentedviews-exposed-form--viewname--displayname.tpl.php should work. Look in the 'theme' directory in the views module for the original template. You can also form_alter the form (views-exposed-form) as well.
Comment #2
edmunsta commentedTheoretically, if I copy the original template entirely into the new template, should it display just as before? I have created views-exposed-form--myviewnamehere--page.tpl.php, and copied exactly the content of views-exposed-form.tpl.php. But when I put the new file into my theme folder, though the view output appears correctly, all the exposed filters have disappeared. A var_dump on $widget and $id both return NULL.
Comment #3
merlinofchaos commentedOh, you're probably being hit by a core bug. Youll need to upgrade to Drupal 6.x-dev (There's a patch mentioned in the help file on the theme: Information section too; you can try that patch though it's now two patches and probably getting a little difficult to apply).
Comment #4
domesticat commentedPerforming a mass closing of all issues over 180 days old. Please reopen if needed.
Comment #5
doublejosh commentedThis is technically how to get to theming the exposed filter form block area, but doesn't help you with the action form itself since it's already been built :(
Comment #6
Makku01 commentedexcuse me but I have no idea how to name the template file for the block of a specific filter. the block ID is block-views-[VIEWNAME]-block_1. How do I have to name the tpl.php for the block? any advise is greatly appreciated! THX
Comment #7
doublejosh commentedDon't believe it's possible to have template for a specific filter item. Only the full block.
That file would be:
views-exposed-form--MYVIEW--block-1.tpl.phpTo mess with filters try a custom module. Here are two example of alterations I use. Hope that helps.