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

Deleting a variable from the page template

While we introduced a new variable in the previous recipe, we will be removing an existing variable in this one. To demonstrate the effectiveness of template variable manipulation, we will be removing the search form as well as feed icons, such as the RSS icon, from only the front page of the site by making them unavailable to the page template file.

Getting ready

We will be using the myzen theme created earlier in this book as the example theme in this recipe. It is also assumed that a page.tpl.php file exists in myzen's templates folder. If not, this file will need to be imported from the Zen base-theme or a new one will need to be created.

How to do it...

Just as we manipulated myzen_preprocess_node() ...

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