I've been learning a lot by playing around with the zen theme. I'm trying to create my sub-theme without modifying any of the files for the main theme. One place I ran into a wall was when using the Views Theme Wizard, which is also new to me.
The problem
I have a view called board_list.
I ran the theme wizard and it generated the code for me. (COOL!)
I placed the code where instructed, including creating a file called views-list-board_list.tpl.php
When I tried to bring up the view in the browser, the pager at the bottom of the view indicated that there were three pages of results, but none of the individual results were output. (The page was blank)
The solution
It took me a while to track down, but the solution was very simple:
I moved views-list-board_list.tpl.php into the zen directory, instead of my sub-theme directory, and VOILA! it works.
I'm afraid I don't know this system well enough to offer a real solution, but thought the bug would be good to file.
Comments
Comment #1
JohnAlbinThe Views theme wizard is very cool.
A zen sub-theme should have all of its files in its own directory. I would consider this a critical bug.
The good news is this is automatically fixed by the theme changes in Drupal 6, but I would like to get this fixed for D5.
Comment #2
OpenChimp CreditAttribution: OpenChimp commentedYeah. A lot of sites will be built and run on D5 for a long time to come. If you have any ideas of where to start I'd give a shot at fixing this.
Comment #3
JohnAlbinWoo-hoo! Fixed in 5.x-1.x-dev.
Comment #4
(not verified) CreditAttribution: commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #5
JohnAlbinTurns out this isn't quite fixed. A patch is require for Views: http://drupal.org/node/215570
Comment #6
JohnAlbinRe-opening until a patched Views Theme Wizard is released.
Comment #7
s.Daniel CreditAttribution: s.Daniel commentedThe patch works for me. However I want to note that the patch doesn't fix the problem, that the css file is searched in the main theme folder. To fix that you will want to change the drupal_add_css function in your views-list-VIEWNAME.tpl.php from:
to
Comment #8
JohnAlbinGood catch, Sebastian!
We can’t patch Views with call to
path_to_subtheme()
since that’s a Zen function. Guess I’ll have to add some documentation.(BTW, I usually delete that
drupal_add_css()
and just add my css to SUBTHEME.css.)Comment #9
JohnAlbinI’m marking this fixed, since I’ve added the fixes to the documentation: http://drupal.org/node/220111
Hopefully, most (but not all) of this will get fixed in Views 5.x-1.7.
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.