[support] Node Template Variant

Chris Miller cjm at tryx.org
Mon Sep 30 16:12:30 UTC 2013



From: "LINDA ROMEY" <lromey at gmail.com> 
To: support at drupal.org 
Sent: Friday, September 27, 2013 3:52:05 PM 
Subject: Re: [support] Node Template Variant 

Chris, just as you put all contrib modules in sites/all/modules, you should have your themes in sites/all/themes 
so you'd have sites/all/themes/yourtheme 
and in yourtheme you'd have a direcotry called templates. Most themes have one, if not, create one. Any template you create or any template you alter (i.e. a template supplied by a module) should go in that folder. Then you don't have to worry about overriding with upgrades 




Hi Linda, 

So, I am using the Bartik theme, for now, and I seek special formatting for a content-type called "Music". If I understand your instructions, then I should copy and subsequently modify: 


    * /themes/bartik/templates/node.tpl.php ==> /sites/all/themes/bartik/templates/node--music.tpl.php 
    * /themes/bartik/templates/page.tpl.php ==> /sites/all/themes/bartik/templates/page--node--music.tpl.php 

So far, so good? 

Now my next question. Let's assume that this is going to happen more frequently than just this one content-type. Is there a way to make the template general and applicable to arbitrary content, like assign it to a panel, and then I can put whatever content I need on that panel? I don't know if I will need this template again, but my preference is to create a re-usable template, not a special kind of content-type. Can that be done? 

Thanks for the help, 

Chris. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20130930/d2a3b76b/attachment.html 


More information about the support mailing list