diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-15 17:10:39 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-09-15 17:10:39 +0000 |
commit | 6c0f8eba1c55b01e8dc3122f67cda34308ba94a2 (patch) | |
tree | e036f2d12a2575241f0a46f095bfa6d4bc5b66dd /themes | |
parent | 60f14083f4ba53ecfbf741d34b6a76e9722c5287 (diff) | |
download | brdo-6c0f8eba1c55b01e8dc3122f67cda34308ba94a2.tar.gz brdo-6c0f8eba1c55b01e8dc3122f67cda34308ba94a2.tar.bz2 |
#469242 by tic2000, Pasqualle, pwolanin, Nick Lewis, moshe weitzman, Rob Loach,
and alexanderpas: page.tpl.php has now been split into html.tpl.php
(for <html>, <head>, and <body>) and page.tpl.php (for page content).
This now provides consistency for granular theming of renderable output in all
template files.
Diffstat (limited to 'themes')
-rw-r--r-- | themes/garland/page.tpl.php | 42 | ||||
-rw-r--r-- | themes/garland/template.php | 14 | ||||
-rw-r--r-- | themes/seven/page.tpl.php | 27 | ||||
-rw-r--r-- | themes/seven/template.php | 4 |
4 files changed, 30 insertions, 57 deletions
diff --git a/themes/garland/page.tpl.php b/themes/garland/page.tpl.php index acca29d9b..5d70f9630 100644 --- a/themes/garland/page.tpl.php +++ b/themes/garland/page.tpl.php @@ -1,23 +1,7 @@ <?php // $Id$ -?><!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 ?>" dir="<?php print $language->dir ?>" - <?php print $rdf_namespaces ?>> - <head profile="<?php print $grddl_profile ?>"> - <title><?php print $head_title ?></title> - <?php print $head ?> - <?php print $styles ?> - <?php print $scripts ?> - <!--[if lt IE 7]> - <?php print $ie_styles ?> - <![endif]--> - </head> - <body class="<?php print $classes ?>"> - - <?php print $page_top; ?> - - <div id="header-region" class="clearfix"><?php print $header ?></div> +?> + <div id="header-region" class="clearfix"><?php print render($page['header']); ?></div> <div id="wrapper"> <div id="container" class="clearfix"> @@ -38,40 +22,36 @@ <?php if ($secondary_nav): print $secondary_nav; endif; ?> </div> <!-- /#header --> - <?php if ($sidebar_first): ?> + <?php if ($page['sidebar_first']): ?> <div id="sidebar-first" class="sidebar"> <?php if ($search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?> - <?php print $sidebar_first ?> + <?php print render($page['sidebar_first']); ?> </div> <?php endif; ?> <div id="center"><div id="squeeze"><div class="right-corner"><div class="left-corner"> <?php print $breadcrumb; ?> - <?php if ($highlight): ?><div id="highlight"><?php print $highlight ?></div><?php endif; ?> + <?php if ($page['highlight']): ?><div id="highlight"><?php render($page['highlight']); ?></div><?php endif; ?> <?php if ($tabs): ?><div id="tabs-wrapper" class="clearfix"><?php endif; ?> <?php if ($title): ?><h2<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h2><?php endif; ?> <?php if ($tabs): ?><ul class="tabs primary"><?php print $tabs ?></ul></div><?php endif; ?> <?php if ($tabs2): ?><ul class="tabs secondary"><?php print $tabs2 ?></ul><?php endif; ?> <?php if ($show_messages && $messages): print $messages; endif; ?> - <?php print $help; ?> + <?php print render($page['help']); ?> <?php if ($action_links): ?><ul class="action-links"><?php print $action_links; ?></ul><?php endif; ?> <div class="clearfix"> - <?php print $content ?> + <?php print render($page['content']); ?> </div> <?php print $feed_icons ?> - <div id="footer"><?php print $footer ?></div> + <div id="footer"><?php print render($page['footer']) ?></div> </div></div></div></div> <!-- /.left-corner, /.right-corner, /#squeeze, /#center --> - <?php if ($sidebar_second): ?> + <?php if ($page['sidebar_second']): ?> <div id="sidebar-second" class="sidebar"> - <?php if (!$sidebar_first && $search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?> - <?php print $sidebar_second ?> + <?php if (!$page['sidebar_first'] && $search_box): ?><div class="block block-theme"><?php print $search_box ?></div><?php endif; ?> + <?php print render($page['sidebar_second']); ?> </div> <?php endif; ?> </div> <!-- /#container --> </div> <!-- /#wrapper --> - - <?php print $page_bottom; ?> - </body> -</html> diff --git a/themes/garland/template.php b/themes/garland/template.php index 70a415ffa..560020315 100644 --- a/themes/garland/template.php +++ b/themes/garland/template.php @@ -20,6 +20,17 @@ function garland_breadcrumb($breadcrumb) { } /** + * Override or insert variables into the html template. + */ +function garland_process_html(&$vars) { + // Hook into color.module + if (module_exists('color')) { + _color_html_alter($vars); + } + $vars['styles'] .= "\n<!--[if lt IE 7]>\n" . garland_get_ie_styles() . "<![endif]-->\n"; +} + +/** * Override or insert variables into the page template. */ function garland_preprocess_page(&$vars) { @@ -54,7 +65,6 @@ function garland_preprocess_page(&$vars) { else { $vars['secondary_nav'] = FALSE; } - $vars['ie_styles'] = garland_get_ie_styles(); // Prepare header $site_fields = array(); @@ -73,7 +83,7 @@ function garland_preprocess_page(&$vars) { } /** - * Override process function used to alter variables as late as possible. + * Override or insert variables into the page template. */ function garland_process_page(&$vars) { // Hook into color.module diff --git a/themes/seven/page.tpl.php b/themes/seven/page.tpl.php index e47ccc334..d5d6b7b49 100644 --- a/themes/seven/page.tpl.php +++ b/themes/seven/page.tpl.php @@ -1,20 +1,6 @@ <?php // $Id$ -?><!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; ?>" dir="<?php print $language->dir; ?>" - <?php print $rdf_namespaces; ?>> - <head profile="<?php print $grddl_profile; ?>"> - <title><?php print $head_title; ?></title> - <?php print $head; ?> - <?php print $styles; ?> - <?php print $scripts; ?> - <?php print $ie_styles; ?> - </head> - <body class="<?php print $classes; ?>"> - - <?php print $page_top; ?> - +?> <div id="branding" class="clearfix"> <?php print $breadcrumb; ?> <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?> @@ -28,13 +14,13 @@ <?php if ($show_messages && $messages): ?> <div id="console" class="clearfix"><?php print $messages; ?></div> <?php endif; ?> - <?php if ($help): ?> + <?php if ($page['help']): ?> <div id="help"> - <?php print $help; ?> + <?php print render($page['help']); ?> </div> <?php endif; ?> <?php if ($action_links): ?><ul class="action-links"><?php print $action_links; ?></ul><?php endif; ?> - <?php print $content; ?> + <?php print render($page['content']); ?> </div> <div id="footer"> @@ -42,8 +28,3 @@ </div> </div> - - <?php print $page_bottom; ?> - - </body> -</html> diff --git a/themes/seven/template.php b/themes/seven/template.php index 416de552a..6f40681ff 100644 --- a/themes/seven/template.php +++ b/themes/seven/template.php @@ -4,10 +4,12 @@ /** * Override or insert variables into the page template. */ +function seven_process_html(&$vars) { + $vars['ie_styles'] = '<!--[if lt IE 7]><style type="text/css" media="screen">@import ' . path_to_theme() . '/ie6.css";</style><![endif]-->'; +} function seven_preprocess_page(&$vars) { $vars['primary_local_tasks'] = menu_primary_local_tasks(); $vars['secondary_local_tasks'] = menu_secondary_local_tasks(); - $vars['ie_styles'] = '<!--[if lt IE 7]><style type="text/css" media="screen">@import ' . path_to_theme() . '/ie6.css";</style><![endif]-->'; } /** |