By dajpanspokoj on
I've just started my Drupal 7 Zen theming and experience a problem.
Using Drupal 7.0, Zen 7.x-3.x-dev.
I want to have a custom front page in my subtheme.
What I did after creating and activating my subtheme is
- copy the
sites/MYSITE/themes/MYTHEME/page.tpl.phptopage--front.tpl.phpand applied my changes and cleared the cache» didn't work (devel themer says that my front page is still rendered by
sites/MYSITEl/themes/MYTHEME/templates/page.tpl.php) - copy
sites/MYSITE/themes/MYTHEME/page--front.tpl.phptosites/all/themes/zen/page--front.tpl.php» didn't work
- rename both
page--front.tpl.phpfiles topage__front.tpl.php, since devel themer gives the following suggestions:
Candidate template files:
page__front < page__node__7 < page__node__% < page__node < sites/MYSITE/themes/MYTHEME/templates/page.tpl.php(Is it really
page__frontinstead ofpage--front?)» didn't work
Do You know how to make my subtheme use its page--front.tpl.php?
Comments
Refresh Cache?
Did you clear the cache after copying the page--front.tpl.php?
Edit: Sorry didnt read your Post carefully enough
It must have been some
It must have been some caching problem - after another browser restart it's worked fine.
Same issue
I seem to be having the same problem. I've tried page--front.tpl.php, and page__front.tpl.php, and cleared caches many times. No effect. Switching back to default theme to see if it works without the Zen theme.
zen theme issue
This looks like a Zen theme issue. I just started creating a new custom theme, and page--front.tpl.php works fine.
similar with blocks
I've come across the issue when overriding theme output.
For some time theme system either looked for template in Zen folder (instead of the subtheme's folder) or used block.tpl.php from subtheme's folder instead of block--block--1.tpl.php. It's automagically fixed after a couple of hours and no apparent action.
If I come experience it once more I'll assemble a precise description and post an issue.
Bartik is also doing it. I
Bartik is also doing it. I can't quite figure out how to get it to recognize it. Neither --, __, or any combination of those seem to work.
This works for me
Have you tried putting both
page.tpl.phpandpage--front.tpl.phpin your sub-theme templates folder.It works for me.
You might need to add a function to template.php
I came across this somewhere, can't remember where. It said that Drupal 7 does not let you theme a page by content type unless you add the following to your theme's template.php file:
where themename needs to be replaced with the name of your theme. There should then be no need to copy page.tpl.php into your theme directory (except to modify it and rename it page--xxxxx.tpl.php).
...
What cache are you clearing exactly, some people think they have to clear their browser cache (no idea why), you have clear the theme registry cache - do this at /admin/config/development/performance, or install the Admin menu module and use the handy drop list, or install the Devel module and set the theme registry to rebuild on every page load.
BTW peeps - its page--front.tpl.php.
Pimp your Drupal 8 Toolbar - make it badass.
Adaptivetheme - theming system for people who don't code.
Agree with you
You are absolutely right Jeff. This issue is mainly generated for not clearing drupal cache properly.
So people please clear your drupal cache[not your browser cache] and try it again.
I've found that if I override
I've found that if I override the page--front.tpl.php in my subtheme, my Drupal 7.7 does not recognise it even I drush cc -> all cache. But it works after I click the "Configuration -> performance -> clear all cache".