O'Reilly logo

Drupal 7 Themes by Ric Shreves

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

Working with template variables

As we have seen previously, Drupal templates often rely upon variables that are used to enhance and extend the functionality. The default Drupal variables cover the most common (and essential) functions. Some of the Drupal variables are unique to particular templates, others are common to all. In addition to the default variables, you can also define your own variables.

Drupal 7 provides two opportunities for adding, deleting, or overriding the variables for your templates. The template variables can be manipulated through the use of either the process or preprocess functions. These functions are run prior to the template being displayed, thereby allowing you to manipulate the variables for use in the templates themselves. ...

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