Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 CreditAttribution: 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 CreditAttribution: Jolidog commentedThank you very much! :)