O'Reilly logo

Drupal 7 Cookbook by Dylan James

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

Overriding HTML output of a content type

For many purposes, creating a content type and re-ordering the fields is enough. However, for more custom implementations you will need to modify the HTML that is output by the system. Drupal provides an elegant mechanism for overriding HTML output using template files, which specify custom HTML markup, encapsulated as a property of the theme.

Getting ready

We will be using the minimalist theme created in the first recipe of this chapter, Creating a new theme using Zen. Please complete this recipe before continuing, and ensure that you have the minimalist theme enabled.

We are going to be editing the theme, so you will need FTP access to the folder unless you are working from your localhost.

How to do it... ...

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