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

Theming a field using a template file

Once our field requirements become complex, we will find ourselves having to resort to modifying the field to meet our needs. As with most things Drupal, template functions and files are where these modifications usually reside.

In this recipe, we will look at modifying the output of the Phone field in the company node type to use an unordered list when there are multiple items present.

Getting ready

We will be using the myzen theme created earlier in this book, to hold our theme customizations. Following the recommendations outlined in earlier chapters, we will also be making use of the Devel and Theme developer modules to assist in identifying the theme functions and templates to override. It is assumed that ...

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