I currently have a general template and a front page template. I made a custom node for a content type I made and it works just fine but then realized that I need an entirely new page template as well. I already made a page--[content_name].tpl.php file and cleared the cache but it wasn't read. Is there something I need to change elsewhere or is what I'm doing completely off? Thank you.
-
1Can you give more detail like the content type name and tpl file name. Just for trying go to theme setting and save the theme again. It might work.– j2rDec 17, 2012 at 7:06
-
create a tpl file in your theme folder, as nodetype.tpl.php as if you have created a node type article them create a templete as article.tpl.php. and this will works, i have used this way in d6,– Sanjay devDec 17, 2012 at 7:28
-
content type is events_home and the filename used was pages--events_home.tpl.php.– jsalitaDec 17, 2012 at 7:30
-
tried making a tpl file that way. it didn't work.– jsalitaDec 17, 2012 at 7:33
-
its page--events_home.tpl.php not "pages" use "page"– j2rDec 17, 2012 at 7:40
2 Answers
For Drupal 6 -- page-[content_type_name].tpl.php
and clear the cache.
For Drupal 7 -- http://www.digett.com/blog/01/11/2012/overriding-page-templates-content-type-drupal-7
-
-
Oh sry I didn't notice this. Checkout this article digett.com/blog/01/11/2012/… Dec 17, 2012 at 7:50
You can do the same thing. means a different layout for specific content type using panels. Check the first answer : Panels for Node Types