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, the BODY
tag, and finally, content that Drupal has deemed to be intrinsic to each page.
In this recipe, we will look at modifying the html.tpl.php
and page.tpl.php
template files in order to override the position of the Skip to main content link...