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

Changing the structure of a page using template files

As we have seen in earlier chapters, the page template file—page.tpl.php—is responsible for the overall layout and markup of a Drupal page. Various elements common to all pages in the site such as the layout of regions, headers, footers, logos, slogans, breadcrumbs, and so on are all positioned in this file. While this may make the page template file appear to be something of a master template file, this is not entirely accurate.

The html.tpl.php template file would be a more apt candidate for the title of master template file as this is where the actual structure of the HTML page is declared. This includes specifying the DOCTYPE of the page, HTML headers where styles and scripts are embedded, ...

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