Simpletest Coverage - modules/system/page.tpl.php

1 <?php
2 // $Id: page.tpl.php,v 1.27 2009/08/03 03:04:33 webchick Exp $
3
4 /**
5 * @file
6 * Default theme implementation to display a single Drupal page.
7 *
8 * Available variables:
9 *
10 * General utility variables:
11 * - $base_path: The base URL path of the Drupal installation. At the very
12 * least, this will always default to /.
13 * - $css: An array of CSS files for the current page.
14 * - $directory: The directory the template is located in, e.g. modules/system
15 * or themes/garland.
16 * - $classes_array: Array of html class attribute values. It is flattened
17 * into a string within the variable $classes.
18 * - $is_front: TRUE if the current page is the front page. Used to toggle the mission statement.
19 * - $logged_in: TRUE if the user is registered and signed in.
20 * - $is_admin: TRUE if the user has permission to access administration pages.
21 *
22 * Page metadata:
23 * - $language: (object) The language the site is being displayed in.
24 * $language->language contains its textual representation.
25 * $language->dir contains the language direction. It will either be 'ltr' or 'rtl'.
26 * - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document.
27 * - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data.
28 * - $head_title: A modified version of the page title, for use in the TITLE tag.
29 * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
30 * so on).
31 * - $styles: Style tags necessary to import all CSS files for the page.
32 * - $scripts: Script tags necessary to load the JavaScript files and settings
33 * for the page.
34 * - $classes: String of classes that can be used to style contextually through
35 * CSS. It should be placed within the <body> tag. When selecting through CSS
36 * it's recommended that you use the body tag, e.g., "body.front". It can be
37 * manipulated through the variable $classes_array from preprocess functions.
38 * The default values can be one or more of the following:
39 * - page: The current template type, i.e., "theming hook".
40 * - front: Page is the home page.
41 * - not-front: Page is not the home page.
42 * - logged-in: The current viewer is logged in.
43 * - not-logged-in: The current viewer is not logged in.
44 * - page-[level 1 path]: The internal first level path. For example, viewing
45 * example.com/user/2 would result in "page-user". Path aliases do not apply.
46 * - node-type-[node type]: When viewing a single node, the type of that node.
47 * For example, if the node is a "Blog entry" it would result in "node-type-blog".
48 * Note that the machine name will often be in a short form of the human readable label.
49 * The following only apply with the default 'sidebar_first' and 'sidebar_second' block regions:
50 * - two-sidebars: When both sidebars have content.
51 * - no-sidebars: When no sidebar content exists.
52 * - one-sidebar and sidebar-first or sidebar-second: A combination of the two classes
53 * when only one of the two sidebars have content.
54 *
55 * Site identity:
56 * - $front_page: The URL of the front page. Use this instead of $base_path,
57 * when linking to the front page. This includes the language domain or prefix.
58 * - $logo: The path to the logo image, as defined in theme configuration.
59 * - $site_name: The name of the site, empty when display has been disabled
60 * in theme settings.
61 * - $site_slogan: The slogan of the site, empty when display has been disabled
62 * in theme settings.
63 *
64 * Navigation:
65 * - $search_box: HTML to display the search box, empty if search has been disabled.
66 * - $main_menu (array): An array containing the Main menu links for the
67 * site, if they have been configured.
68 * - $secondary_menu (array): An array containing the Secondary menu links for
69 * the site, if they have been configured.
70 * - $breadcrumb: The breadcrumb trail for the current page.
71 *
72 * Page content (in order of occurrence in the default page.tpl.php):
73 * - $title: The page title, for use in the actual HTML content.
74 * - $messages: HTML for status and error messages. Should be displayed prominently.
75 * - $tabs: Tabs linking to any sub-pages beneath the current page (e.g., the view
76 * and edit tabs when displaying a node).
77 * - $help: Dynamic help text, mostly for admin pages.
78 * - $content: The main content of the current page.
79 * - $feed_icons: A string of all feed icons for the current page.
80 * - $sidebar_first: Items for the first sidebar.
81 * - $sidebar_second: Items for the second sidebar.
82 * - $highlight: Items for the highlighted content region.
83 *
84 * Opening and closing data:
85 * - $page_top: Initial markup from any modules that have altered the
86 * page. This variable should always be output first, before all other dynamic
87 * content.
88 * - $footer : The footer region.
89 * - $page_bottom: Final closing markup from any modules that have altered the
90 * page. This variable should always be output last, after all other dynamic
91 * content.
92 *
93 * @see template_preprocess()
94 * @see template_preprocess_page()
95 * @see template_process()
96 */
97 ?>
98 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN"
99 "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">
100 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>"
101 <?php print $rdf_namespaces; ?>>
102
103 <head profile="<?php print $grddl_profile; ?>">
104 <title><?php print $head_title; ?></title>
105 <?php print $head; ?>
106 <?php print $styles; ?>
107 <?php print $scripts; ?>
108 </head>
109 <body class="<?php print $classes; ?>">
110
111 <?php print $page_top; ?>
112
113 <div id="page-wrapper"><div id="page">
114
115 <div id="header"><div class="section clearfix">
116
117 <?php if ($logo): ?>
118 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
119 <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
120 </a>
121 <?php endif; ?>
122
123 <?php if ($site_name || $site_slogan): ?>
124 <div id="name-and-slogan">
125 <?php if ($site_name): ?>
126 <?php if ($title): ?>
127 <div id="site-name"><strong>
128 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
129 </strong></div>
130 <?php else: /* Use h1 when the content title is empty */ ?>
131 <h1 id="site-name">
132 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
133 </h1>
134 <?php endif; ?>
135 <?php endif; ?>
136
137 <?php if ($site_slogan): ?>
138 <div id="site-slogan"><?php print $site_slogan; ?></div>
139 <?php endif; ?>
140 </div> <!-- /#name-and-slogan -->
141 <?php endif; ?>
142
143 <?php if ($search_box): ?>
144 <div id="search-box"><?php print $search_box; ?></div>
145 <?php endif; ?>
146
147 <?php if ($header): ?>
148 <div id="header-region" class="region">
149 <?php print $header; ?>
150 </div>
151 <?php endif; ?>
152
153 </div></div> <!-- /.section, /#header -->
154
155 <?php if ($main_menu): ?>
156 <div id="navigation"><div class="section">
157 <?php print theme('links', $main_menu, array('id' => 'main-menu', 'class' => 'links clearfix')); ?>
158 </div></div> <!-- /.section, /#navigation -->
159 <?php endif; ?>
160
161 <?php if ($breadcrumb): ?>
162 <div id="breadcrumb"><?php print $breadcrumb; ?></div>
163 <?php endif; ?>
164
165 <?php print $messages; ?>
166
167 <div id="main-wrapper"><div id="main" class="clearfix">
168
169 <div id="content" class="column"><div class="section">
170 <?php if ($highlight): ?><div id="highlight"><?php print $highlight; ?></div><?php endif; ?>
171 <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
172 <?php if ($tabs): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
173 <?php print $help; ?>
174 <div id="content-area" class="region">
175 <?php print $content; ?>
176 </div> <!-- /#content-area -->
177 <?php print $feed_icons; ?>
178 </div></div> <!-- /.section, /#content -->
179
180 <?php if ($sidebar_first): ?>
181 <div id="sidebar-first" class="column sidebar"><div class="section region">
182 <?php print $sidebar_first; ?>
183 </div></div> <!-- /.section, /#sidebar-first -->
184 <?php endif; ?>
185
186 <?php if ($sidebar_second): ?>
187 <div id="sidebar-second" class="column sidebar"><div class="section region">
188 <?php print $sidebar_second; ?>
189 </div></div> <!-- /.section, /#sidebar-second -->
190 <?php endif; ?>
191
192 </div></div> <!-- /#main, /#main-wrapper -->
193
194 <div id="footer"><div class="section">
195 <?php print theme('links', $secondary_menu, array('id' => 'secondary-menu', 'class' => 'links clearfix')); ?>
196 <?php if ($footer): ?><div id="footer-region" class="region"><?php print $footer; ?></div><?php endif; ?>
197 </div></div> <!-- /.section, /#footer -->
198
199 </div></div> <!-- /#page, /#page-wrapper -->
200
201 <?php print $page_bottom; ?>
202
203 </body>
204 </html>
205

Legend

Missed
lines code that were not excersized during program execution.
Covered
lines code were excersized during program execution.
Comment/non executable
Comment or non-executable line of code.
Dead
lines of code that according to xdebug could not be executed. This is counted as coverage code because in almost all cases it is code that runnable.