Active
Project:
Node Page Template
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2010 at 17:00 UTC
Updated:
17 Jul 2013 at 08:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
escoles commentedI also set my theme to rebuild the theme registry on every page load. Doesn't appear to make a difference in behavior.
Comment #2
DenRaf commentedYou just need to put the template file in the active theme. Then it will be available for selection.
Comment #3
escoles commentedI see: It needs to be in the root of the theme folder. If a theme (like AdaptiveTheme) is coded to use a sub-folder to store templates, this doesn't support that.
The theme I'm working with stores its templates in a subfolder:
/sites/all/themes/[theme-name]/[sub-theme-name]/templates/However, to be recognized by Node Page Template, I have to place them here:
/sites/all/themes/[theme-name]/[sub-theme-name]/Note also that if there's a file having the same name in the
..../templates/directory, it will be used in preference to the one that's detected/selected by Node Page Template.Actually, just testing some things as I write this and it seems that the behavior is much odder than that. I don't want to say too much just yet; want to do some more testing. Suffice to say that it seems pretty inconsistent.
Will test more and come back. I plan to use this module, and need to understand its quirks first.
Comment #4
escoles commentedMORE DETAILS
Node Page Template recognizes the existence of templates based on whether it finds them in the root of the theme folder.
But templates are still applied based on the theme's parameters. So if your theme places templates in subfolders (e.g., AdaptiveTheme subthemes, which place templates in a "templates" subfolder), you seem to need to have two copies of the template file: one in the root, and one in the subfolder.
I'm not sure whether this is by design or accidental -- not sure what to make of it. At this point, for my situation, it's just an undocumented configuration requirement.
Also, if you move the site to another server or do SQL exports from production for development (or vice versa), you should be careful to clear your theme registry before you dump the database. Having multiple template files with the same name in the "wrong" places can result in an apparent WSOD [white screen of death] with no logged PHP errors (trying to load update.php will show you the errors, though).*
--
*Aside: I got into this situation, I think, because both my presentation and admin themes are sub-themes of a parent. If I were using completely discrete admin and presentation themes, this might not have happened. Not relevant to this issue, but relevant to recovering from it, so I mention it.
Comment #5
aschiwi commentedI second this request. I like to keep clean template files, some themes are really big and have lots of theme files that I organize in page, views, node and cck templates for example. Would be cool if this module supported this.
Comment #6
Anonymous (not verified) commentedThis patch adds traversing through subdirectories.
Comment #7
Anonymous (not verified) commentedand here's a patch that lists all .tpl.php files in the active theme
Comment #8
theargument commentedFurther to these posts / patches - I'm using Genesis as my base theme and developing a subtheme - I've run the patch to include the subdirectory info in the theme path BUT it's causing a WSOD.
I think this is because the theme I'm using isn't the default - instead it's a development theme for a redesign that I'm running alongside the existing (default) theme) - so the node_page template listing is coming from the default theme (which anonymous users get to see) and not the active theme (which site admin gets to see)...
I'm pretty sure this shouldn't be too hard to fix but my PHP just ain't up to it... would be great if someone's was though.
Thanks in advance to any kind soul who fixes it for me!
Comment #9
john franklin commentedAttached patch adds:
domain-base-page.diff requires #7 to be applied first.
domain-base-page-plus-7.diff incorporates #7.