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.
By gatti on
I tried to create a blog entry specific template and from my understanding all I need to do to override the default node.tpl.php file is to name the blog one node--blog.tpl.php but when I create a blog post it still uses the node.tpl.php file. Is there some step that I am missing?
Comments
Have you tried clearing your
Have you tried clearing your Theme Registry? This needs to be done every time you add a new file to your theme folder.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
same problem here
did drush cc all but still no luck :(
Can any guru collaberate on this one :) ?
It seems like it's not a node type or something.
Thanks in advance.
Check Content Type
Make sure that your content type's machine name is "blog" and that your file is node--blog.tpl.php (Drupal 7 uses two dashes)
If your content type machine name is not "blog", you'll need to change the file name. For example: if you've named your content type "blog entry", you'll need to change the file to node--blog_entry.tpl.php
Good luck and clear cache a lot! :)
Did you use display suite ?
Did you use display suite ?
display suite overrides its own template and drupal call that template instead of your custom template which is "node--blog.tpl.php",
so you have to select Layout as "None" for blog content type under manage display tab. After that drupal will call "node--blog.tpl.php".
Node override
How Node override using node.tpl.php ??? Need help