By Keith Hurst on
Hi,
I'm going around in circles here. I've checked blogs, Drupal posts and I just can't theme an exposed view form vi an associated tpl file in my theme.
View Name : volunteerreport
TPL File : views-exposed-form--volunteerreport.tpl.php
I copied the standard supplied views-exposed-form.tpl.php into my theme, renamed it to the above and simply added a H1 tag at the top to see if it was kicking in. It doesn't matter if I keep the standard views-exposed-form.tpl.php filename.
I have modified my view, gone into Basic Settings - Theme and rescanned, pressed OK and resaved the form.
According to what I have read this 'should' be enough but I'm obviously missing something.
Any ideas ?
Thanks,
Keith
Comments
Bump... anyone ?
Bump... anyone ?
If you use the Devel module
If you use the Devel module along with the Theme Developer module, it will give you suggestions as far as template naming is concerned.
If you're using the view as a page view, the views template may not actually be what you're looking for; check to see if what you're trying to do needs to be done via a page template modification instead, or in addition to your views .tpl mod.
Theme Developer should clarify what's doing on in your page - be aware that it's a development tool and slows things down a lot - you don't want it enabled on a production site.
Hope this helps!
>gone into Basic Settings -
>gone into Basic Settings - Theme and rescanned, pressed OK and resaved the form
IIRC rescanning doesn't affect what will actually get used by the theme system. Just lets you see the effect of adding a new template. Did you see your copy of the template being picked up? To get it to work you have to make sure the site theme is being used as the admin theme since the Views Theme thingy uses the theme that is currently active on the config screen. Unless this has changed since I last played around with it.
gpk
----
www.alexoria.co.uk
How Interesting
AAAhhhhh....
Seems to make some sort of sense really, I am using a different admin theme.... actually using the admin module... http://drupal.org/project/admin which sits on top of the TAO theme if I remember correctly.
A simple change, I'll check it out and get back to you. Thanks for everyone's input.
KH
The "To get it to work.."
The "To get it to work.." comment referred to the Views theme thing .... if your template is in the right place and named correctly it will be picked up by the Drupal theme system willy nilly, but the process I follow is 1. set admin theme to site theme 2. create template and try to give it the right name 3. use the Views theme thing to see if my template is being picked up 4. correct filename of my template 5. repeat steps 3. 4. , and finally when it's all working 6. restore the admin theme.
gpk
----
www.alexoria.co.uk