Closed (fixed)
Project:
Zen
Version:
6.x-2.x-dev
Component:
PHP Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Nov 2010 at 16:07 UTC
Updated:
7 Mar 2011 at 23:01 UTC
I find it quite puzzling that in layout-fixed.css, it says:
/* DO NOT CHANGE. Add padding or margin to .region-sidebar-first .section. */
whereas the generated HTML doesn't have the .section DIV.
Well, here's the patch that fixed it, anyway.
| Comment | File | Size | Author |
|---|---|---|---|
| region-sidebar.patch | 759 bytes | deslack |
Comments
Comment #1
johnalbinThe sidebar already has a
<div class="section">in it. Look at region-sidebar.tpl.php.This patch is completely unnecessary.
Comment #2
jolidog commentedThe region-sidebar.tpl.php is not being called. The sidebars are using the region.tpl.php template, so no internal section div.
I can confirm this is still happening as of the latest dev.
Comment #3
johnalbinWell, crap. I can confirm that this worked in 6.x-2.0, but does indeed not work now. Investigating…
Thanks for the bug reports and I apologize for the somewhat harsh tone in my first comment, Deslack.
Comment #4
johnalbinThe 6.x-2.x-dev version did some work to "Convert region template suggestions into theme hook suggestions":
http://drupal.org/cvs?commit=420856
http://drupal.org/cvs?commit=434562
It turns out that theme hooks created by the theme do not get their theme hook suggestions set up properly. This is because the suggestions are discovered during phptemplate_theme() which runs before zen_theme().
Deslack, your patch would fix the suggestion for region-sidebar.tpl, but it wouldn't fix the problem for any other suggestion like region-navigation.tpl.php or region-footer.tpl.php, etc.
phtemplate_theme() does its magic with drupal_find_theme_templates(). We need to run that on the region hook before zen_theme() returns.
Ok. Fixed. http://drupal.org/cvs?commit=503400
I've confirmed that the region-sidebar.tpl is now used properly and that you can use any region-* template in a sub-theme without needing the region.tpl.php.
Comment #5
jolidog commentedThank you very much! :)