O'Reilly logo

Drupal 7 Theming Cookbook by Karthik Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Customizing the appearance of a particular node type

Drupal's PHPTemplate theming engine uses naming conventions to easily theme nodes. While the standard template used is named node.tpl.php, other naming conventions are available to target specific subsets of nodes. Here we will be looking at specifically theming content of a particular node type story by modifying it so that the title of the node does not link to its content in its teaser view, thereby directing users to click the Read more link instead.

Getting ready

This recipe uses the myzen theme created earlier in this book as an example theme. As we are going to be working with a node type named story, ensure that it exists via the content type administration page at admin/structure/types ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required