The Drupal 7 html.tpl.php
file is now named page.tpl.php
(similar to Drupal 6). The Drupal 7 page.tpl.php
file is replaced by individual layout.tpl.php
files.
Some variables available in the html.tpl.php
file in Drupal 7 are no longer necessary/available in the Backdrop page.tpl.php
file.
Variables previously in page.tpl.php
that have been removed:
$language
$head
$css
$styles
$scripts
Instead of using variables in this template:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" version="XHTML+RDFa 1.0" dir="<?php print $language->dir; ?>"<?php print $rdf_namespaces; ?>>
<head profile="<?php print $grddl_profile; ?>">
<?php print $head; ?>
<title><?php print $head_title; ?></title>
<?php print $styles; ?>
<?php print $scripts; ?>
</head>
<body class="<?php print $classes; ?>" <?php print $attributes; ?>>
<div id="skip-link">
<a href="#main-content" class="element-invisible element-focusable"><?php print t('Skip to main content'); ?></a>
</div>
<?php print $page_top; ?>
<?php print $page; ?>
<?php print $page_bottom; ?>
</body>
</html>
Use function calls directly from the template instead:
<!DOCTYPE html>
<html<?php print backdrop_attributes($html_attributes); ?>>
<head>
<?php print backdrop_get_html_head(); ?>
<title><?php print $head_title; ?></title>
<?php print backdrop_get_css(); ?>
<?php print backdrop_get_js(); ?>
</head>
<body class="<?php print implode(' ', $classes); ?>"<?php print backdrop_attributes($body_attributes); ?>>
<?php print $page; ?>
<?php print $page_bottom; ?>
<?php print backdrop_get_js('footer'); ?>
</body>
</html>
Introduced in branch:
1.0.x
Introduced in version:
1.0.0
Impacts:
Theme developers