Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I create a 'node-{content-type}.tpl.php' in my templates folder within my zen subtheme it won't get picked up and used. I have to drop it in the master zen/templates folder.
You could do this in 1.x, is this a bug in 2.x or do I have to create them differently?
Cheers
Comments
Comment #1
akalata CreditAttribution: akalata commentedYou'll need to copy node.tpl.php from Zen into your subtheme, in the same directory as your node-{content-type}.tpl.php. This is an existing bug in the Drupal templating system - see http://drupal.org/node/279573 for more info. :)
Comment #2
deastlack CreditAttribution: deastlack commentedHave copied the node.tpl.php file along with the page.tpl.php files since several postings and documentation articles implied that file should be copied as well.
Still doesn't work. cant get my content_type.tpl.php files to be recognized and used. For that matter my sub themes template.php file doesn't seem to get accessed either.
May be I got a bug elsewhere in my sub theme? any thoughts on where to look?
Comment #3
akalata CreditAttribution: akalata commentedWhat is the exact name of your tpl file? You've mentioned node-content-type.tpl.php and content_type.tpl.php. It should be named node-[type-machine-name].tpl.php -- and hyphens or underscores matter there. So you might need to use node-content_type.tpl.php.
Also, don't forget to clear your theme registry! Clear cache, etc.
Comment #4
shruti.sheth CreditAttribution: shruti.sheth commentedAgree with, http://drupal.org/node/858204#comment-4188520
Comment #5
gowrann CreditAttribution: gowrann commentedadd this you theme template.php file:
Change YOURTHEMENAME to your theme name!
Comment #6
echoz CreditAttribution: echoz commented