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

Module-based variable manipulation

This recipe will outline an alternative method to variable manipulation performed at the module level rather than at the theme level. This provides the advantage of being theme-agnostic, that is, the modifications made will be made available or applied to all themes which is particularly useful if a site uses more than one theme.

To demonstrate this approach, we will be adding a list of classes to the node template based on the taxonomy terms associated with the node in question.

Getting ready

We will be using the mysite module created earlier in this book as an example module to hold our odds and ends. Since we are going to demonstrate injecting classes based on the taxonomy terms, a sample node and associated ...

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