When I provide my sub-theme with a page.tpl.php file and switch the default theme to another one I have issues.
When i go back to the index (i use a different theme as admin theme) the style is missing. When i check the source of the html i dont see the sub-themes css files anymore. It looks like the template.php of the sub-theme is not parsed anymore. It doesn't matter if i switch back and fort between themes, the sub-theme won't work anymore until i remove the page.tpl.php again.
My drupal version is 5.2
Carlo
Comments
Comment #1
jjeff commentedI believe that the problem is that as soon as you create a page.tpl.php file, PHPTemplate sees this as a new theme. This is the reason that I started the Zengine theme engine and also the reason that Drupal 6 now uses .info files.
If you're wanting to create a "sub" theme with complete page templates, you should probably check out Zengine... perhaps you can help me document it! ;-)
Comment #2
blb commentedi am having the same trouble. is there any way to hide the .tpl.php files from the engine?
alternatively, is their a straightfoward conversion process between zen and zengine?
Comment #3
Shawn Parr commentedI also have seen this issue. My workaround is to either:
1a. rename the page.tpl.php to something else
or
1b. delete the page.tpl.php
2. Navigate back into the Themes admin page
3. Put back/rename the page.tpl.php.
Annoying, but solvable for the time being. Is there a smooth transition to Zengine? I know that zen has apparently split into 3 projects and I would like to go with something that is stable from a development standpoint.
I'm actually using the latest version of Zen (5.x-0.6 IIR).
Comment #4
johnalbinWhen I start work on http://drupal.org/node/171464, I will look at this issue too.
Comment #5
neurojavi commentedI have the same issue.
I have to rename page.tpl.php every time I go to admin/build/themes
The problem is in the phptemplate_templates funtion in phptemplate.engine. This function uses the presence of a page.tpl.php file to determine the primary phptemplate themes list.
I've lost some hours with this issue... (I've found this bug report later, when trying to post the issue)
I think this is a critical bug.
If the page.tpl.php overide doesn't work, I think it would be better for this functionality to be removed (or fixed if there's a easy way)
As someone asked before:
is there a straightfoward conversion process between zen and zengine?
and Is zenengine mature for production use?
Comment #6
neurojavi commentedMore descriptive tittle with the symptom (and the cause)
This is easiest to find
Comment #7
johnalbinAbout to commit a fix for this.
Comment #8
johnalbinAdded a zen-subtheme.php file that should be copied and included by sub-themes of Zen.
See the new zen_classic sub-theme for details.
Comment #9
steve hawkins commentedHey John,
The zen-subtheme files are marked as dead in cvs?
Comment #10
johnalbinAll the work has been going on in DRUPAL-5, not in HEAD. I've now synced HEAD with DRUPAL-5, so the new 5.x files don't appear to be in the Attic. Better?
Comment #11
johnalbinI've implemented a better solution for this problem. The previous solution would have resulted in multiple copies of zen-subtheme.php and inevitable code drift.
The new solution is to include zen's template.php from the sub-theme's template.php file and let zen's template.php do all the heavy lifting.
In the sub-theme's template.php:
This has been committed to 5.x-1.x-dev.
Comment #12
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
johnalbinNot sure why I didn’t think of this sooner. This is now the preferred way (as seen in zen_classic’s template.php):