Active
Project:
Genesis
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2009 at 06:08 UTC
Updated:
28 Aug 2009 at 00:15 UTC
I want to theme pages for a specific content type (story) by giving it it's own unique page-story-tpl.php file. The end goal is to have all story pages have a slightly different theme from other pages.
I read the documentation and duplicated the page.tpl.php file and renamed it page-story.tpl.php. and made the necessary changes. However, the Drupal ignores the theme suggestion and continues to call page.tpl.php.
Do you have any suggestions as to what I may be doing wrong?
Comments
Comment #1
cmckay commentedI finally found a solution that works - http://drupal.org/node/296111
(Not sure if this is the best way of doing this however)
Comment #2
Jeff Burnz commentedIts better to this in preprocess function such as:
http://drupal.org/node/223440#comment-1101275
Comment #3
Jeff Burnz commentedComment #4
cmckay commentedDidn't quite get you...are you saying that the method you linked to is better?
I tried adding it to the template file. Duplicated the page.tpl.php file and renamed it page-node.tpl.php.
Comment #5
Jeff Burnz commentedit should be more effecient, but page-node.tpl.php is a default template suggestion and will take over all node views, you would want to make a page-[content-type] template, and then clear the registry so drupal sees the new template, make sure all these templates are in the same directory as page.tpl.php or they won't work.
Comment #6
cmckay commentedhmm...I can definitely see where it is more efficient. However, for some reason, your method doesn't work for me.