[support] Overriding templates

Chris Miller cjm at tryx.org
Thu Oct 10 19:31:23 UTC 2013


Hi Folks, 

I have a sub-theme based on Bartik. I have a content type called "Music" for which I would like a special template -- one without any Drupal adornments except the central content region. I've read that I can override with increasing discrimination by naming *.tpl.php correctly. Given that I want to modify the display for all content of type "Music", then I think I need to have: node--music.tpl.php. Do I also need page--music.tpl.php or do I also need page--node.tpl.php or both? Do I put these in .../sites/all/themes/bartik_cjm/, or .../sites/all/themes/bartik_cjm/templates, or does it not matter? 

I copied page.tpl.php and node.tpl.php from Bartik, renamed them page--node.tpl.php and node--music.tpl.php and I hacked them quite severely: 
s/print /print 'XXX' . / 
so I would not fail to notice some change, and I see no change, so I have to conclude that my custom template files are being ignored. I need to fix this problem before I hurt their delicate little egos. 
-- 
Chris. 

916.799.9461 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20131010/9fdd7c98/attachment.html 


More information about the support mailing list