Closed (works as designed)
Project:
Genesis
Version:
6.x-2.4
Component:
Genesis SUBTHEME
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2011 at 13:56 UTC
Updated:
30 Sep 2011 at 11:18 UTC
Hi there,
I have to move the node.tpl.php and the node-[types].tpl.php files to the root of my subtheme to work, leaving them in the subfolder 'templates/nodes' doesn't seem to work.
I am not a developer so I can't setup a prepocess function or whatever is necessarily to leave the template files in the subfolder of 'templates/nodes'.
It's no problem, but perhaps a nice to have, if we can leave the template files in the folder.
Greets from germany (and sorry for my english ;))
Comments
Comment #1
Jeff Burnz commentedYou can have templates in sub-folders, this has never been a problem in Drupal 6 or Genesis - the only thing that is required for Drupal 6 themes is that the node.tpl.php template is in the same directory, and clear the theme registry. Sorry, but there is no feature to add, it already works.
Comment #2
MoSaG commentedI've tried the scenario you describe, but it doesn't work!
Scenario 1:
(default in genesis subtheme)
genesis_my_subtheme/templates/nodes/node.tpl.php - works
genesis_my_subtheme/templates/nodes/node-my_content_type.tpl.php - doesn't work
Scenario 2:
(moved node.tpl.php to root of subtheme as described here: http://drupal.org/node/17565)
genesis_my_subtheme/node.tpl.php - works
genesis_my_subtheme/templates/nodes/node-my_content_type.tpl.php - doesn't work
Scenario 3:
(moved node.tpl.php to root of genesis base theme root)
genesis/templates/node.tpl.php - works
genesis_my_subtheme/templates/nodes/node.tpl.php - works
genesis_my_subtheme/templates/nodes/node-my_content_type.tpl.php - doesn't work
Scenario 4:
only one that works (moved all node.tpls to root of subtheme)
genesis_my_subtheme/node.tpl.php - works
genesis_my_subtheme/node-my_content_type.tpl.php - works
Comment #3
Jeff Burnz commentednot a genesis issue sorry, but did you actually do what i said in #1?
all so with all those tpl files floating around could be a problem Drupal will take the first file it finds that matches so if that's on the root it won't look any deeper
Comment #4
MoSaG commentedSorry, I don't know if this is a genesis issue or not, but with garland theme it works too (but the node.tpl.php is in the root of the garland theme ...)
You ask if I've done what you've said in #1:
the only thing that is required for Drupal 6 themes is that the node.tpl.php template is in the same directory
in the same directory of what?
If I think logical, I put my node-contenttype.tpl.php in the same folder where the node.tpl.php is. But if I do it as you described in #1 and how it is described in http://drupal.org/node/17565 too, than I have to put the node.tpl.php in the root of the subtheme, right? But if I put my node-contenttype.tpl.php in the default folder 'genesis_my_subtheme/templates/nodes/' it will be ignored, if I put it in the root where the node.tpl.php is, it works.
Sorry, I can't better describe the 'problem' ...