Tuesday, January 10, 2012

Theming nodes based on content type in Drupal 6

Theming nodes based on content type in drupal 6

*The file node.tpl.php is used to theme certain types of nodes.

*This file will be in module/node folder in the root directory.

*To theme individual content types in different ways, you need to create a file node-[type].tpl.php in your theme's folder & copy the content from node.tpl.php to this file, where [type] is the machine readable name of the content type

node-story.tpl.php
Themes only Story type nodes.

node-forum.tpl.php
Themes only Forum type nodes.

No comments:

Post a Comment