i'm trying to get the D7's region overrides working.
if in my (fusion) subtheme's 'page--front.tpl.php' I have
<? php print render($page['header']); ?>
, and in 'region--header.tpl.php' I simply add
<div>BLAH BLAH</div>
i'd expect to see "BLAH BLAH" displayed on my front page. atm, it's not.
a similar addition to a copy of 'region.tpl.php' in my subtheme, otoh, DOES get changes picked up & displayed.
noting in html.tpl.php
tho :-/ add'ns to region--page_top.tpl.php DO get picked up, but additions to region--page.tpl.php &/or region--page_bottom.tpl.php do NOT ... even tho html.tpl.php contains:
print $page_top;
print $page;
print $page_bottom;
if I add something to 'region--page_top.tpl.php', changes ARE picked up & displayed. but,
if I add same changes to 'region--page_bottom.tpl.php', changes ARE *NOT* picked up & displayed.
so, not exactly consistent behavior
@ region.tpl.php, works
@ region--header.tpl.php FAILS
@ region--page_top.tpl.php works
@ region--page_bottom.tpl.php FAILS
What needs to be done to get them all working?
Comments
fyi,@
fyi,
@ http://api.drupal.org/api/drupal/includes--theme.inc/function/template_p... suggests
"... Uses the region name to generate a template file suggestions ..."
which would imply (verified @ http://drupal.org/node/1200222) that one should use 'region__(region_name).tpl.php' for overrides.
but, i've now tried each of:
region-(region_name).tpl.php
region--(region_name).tpl.php
region_(region_name).tpl.php
region__(region_name).tpl.php
Only some, not all, for the second case, 'region--(region_name).tpl.php' are working.
Hate to ask the obvious, but
Hate to ask the obvious, but are you clearing the theme registry after you add your new templates?
yes. set to clear/rebuild
yes. set to clear/rebuild after each page load.
also did 'drush cc all'; no help.
Your theme folder needs a
Your theme folder needs a region.tpl.php for any of region--(region_name).tpl.php to work and region names need to be in the theme's .info file.
> Your theme folder needs a
> Your theme folder needs a region.tpl.php for any of region--(region_name).tpl.php to work
yes, as documented. it's 'in there'.
> and region names need to be in the theme's .info file.
of course. they're declared in the .info.
in any case, the problem, as reported, persists.