O'Reilly logo

Drupal 6 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 specific node

In a similar vein to an earlier recipe, we will be looking at using the Drupal theme system's naming scheme to customize specific pieces of content. While the previous recipe targeted nodes of a particular node type, here we are going to target a single node based on its node ID. However, Drupal does not support this particular naming convention out of the box. So we have to do the next best thing—add it ourselves.

The customization we will be performing on the node in question is that it should only display its content and links to authenticated users. In other words, anonymous users will only be able to see its title.

Getting ready

There are two places where we can add our new template suggestion. ...

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