custom node template ignored in sub themes
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | theme system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Drupal 6.9, views 6.x-2.3
I created a sub theme of marinelli in a sibling directory... Then for my event content type I wanted to
create a custom node template, so I made a copy of the node.tpl.php in the marinelli dir as node-event.tpl.php
in my sub theme directory... After clearing my cache, the system was still using the default template to render
the Event nodes. Later I discovered that if I moved my custom node template to the marinelli directory, then
the custom template was picked up..
This is different from my custom views template, when I create custom templates in the views subdirectory
of my sub theme and rescan the template files, the correct template is picked up from my sub theme..

#1
I was experiencing the same difficulty with a sub-theme of Acquia Marina.
I found that once I duplicated the default node.tpl.php file from the Acquia Marina directory, into my sub-theme directory, then the node-type-specific file (in my case node-biblio.tpl.php) is picked up from the sub-theme.
That is, in the sub-theme directory you need a node.tpl.php file as well as node-event.tpl.php.
#2
JDSaward , thank you for the tip... your solution worked for me too...
although to pull node.tpl.php into my sub theme takes a chunk out of the significance
of having a base theme.. might as well take a copy of my base theme and edit that..
-John G
#3
This is a limitation of the phptemplate engine system under Drupal 6. It may be fixed in Drupal 7, I'm not sure.
#4
While some of this can be simplified by using symlinks, it is a bug, makes subthemes definitely less useful, and needs to be fixed.
#5
I agree with Damien. Any chance this will be fixed in D7?
In the meantime, at least some mention of this in the docs would be helpful. I got here from some helpful comments, but this gotcha should be in the main text.
http://drupal.org/node/225125
#6
I don't know if this was fixed in Drupal 7 but this is certainly in the wrong project.
Is this a bug or a feature request? If it's a feature, I think it's too late for 7, if it's wasn't fixed.
#7
This is definitely a bug.
#8
Ok, moving to 7.x to see if this is acceptable there or if this happened to be fixed already.