b00c1b381abbdf4048b9c3c694f5396beb67476d
6 * Theme implementation to display a single Drupal page.
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
16 * - $body_classes_array: Array of the body classes. 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.
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 * - $head_title: A modified version of the page title, for use in the TITLE tag.
27 * - $head: Markup for the HEAD section (including meta tags, keyword tags, and
29 * - $styles: Style tags necessary to import all CSS files for the page.
30 * - $scripts: Script tags necessary to load the JavaScript files and settings
32 * - $body_classes: String of classes that can be used to style contextually through
33 * CSS. It should be placed within the <body> tag. When selecting through CSS
34 * it's recommended that you use the body tag, e.g., "body.front". It can be
35 * manipulated through the variable $classes_array from preprocess functions.
36 * The default values can be one or more of the following:
37 * - front: Page is the home page.
38 * - not-front: Page is not the home page.
39 * - logged-in: The current viewer is logged in.
40 * - not-logged-in: The current viewer is not logged in.
41 * - node-type-[node type]: When viewing a single node, the type of that node.
42 * For example, if the node is a "Blog entry" it would result in "node-type-blog".
43 * Note that the machine name will often be in a short form of the human readable label.
44 * The following only apply with the default 'sidebar_first' and 'sidebar_second' block regions:
45 * - two-sidebars: When both sidebars have content.
46 * - no-sidebars: When no sidebar content exists.
47 * - one-sidebar and sidebar-first or sidebar-second: A combination of
48 * the two classes when only one of the two sidebars have content.
51 * - $front_page: The URL of the front page. Use this instead of $base_path,
52 * when linking to the front page. This includes the language domain or prefix.
53 * - $logo: The path to the logo image, as defined in theme configuration.
54 * - $site_name: The name of the site, empty when display has been disabled
56 * - $site_slogan: The slogan of the site, empty when display has been disabled
58 * - $mission: The text of the site mission, empty when display has been disabled
62 * - $search_box: HTML to display the search box, empty if search has been disabled.
63 * - $primary_links (array): An array containing the Primary menu links for the
64 * site, if they have been configured.
65 * - $secondary_links (array): An array containing the Secondary menu links for
66 * the site, if they have been configured.
67 * - $breadcrumb: The breadcrumb trail for the current page.
69 * Page content (in order of occurrence in the default page.tpl.php):
70 * - $title: The page title, for use in the actual HTML content.
71 * - $messages: HTML for status and error messages. Should be displayed prominently.
72 * - $tabs: Tabs linking to any sub-pages beneath the current page (e.g., the view
73 * and edit tabs when displaying a node).
74 * - $help: Dynamic help text, mostly for admin pages.
75 * - $content: The main content of the current page.
76 * - $feed_icons: A string of all feed icons for the current page.
77 * - $left: The HTML for the first sidebar.
78 * - $right: The HTML for the second sidebar.
80 * Footer/closing data:
81 * - $footer_message: The footer message as defined in the admin settings.
82 * - $footer : The footer region.
83 * - $closure: Final closing markup from any modules that have altered the page.
84 * This variable should always be output last, after all other dynamic content.
86 * @see template_preprocess()
87 * @see template_preprocess_page()
90 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
91 <html xmlns
="http://www.w3.org/1999/xhtml" xml
:lang
="<?php print $language->language; ?>" lang
="<?php print $language->language; ?>" dir="<?php print $language->dir; ?>">
94 <title
><?php
print $head_title; ?
></title
>
96 <?php
print $styles; ?
>
97 <?php
print $scripts; ?
>
99 <body
class="<?php print $body_classes; ?>">
101 <div id
="page"><div id
="page-inner">
103 <?php
if ($primary_links || $secondary_links || $navbar): ?
>
104 <div id
="skip-to-nav"><a href
="#navigation"><?php
print t('Skip to Navigation'); ?
></a
></div
>
107 <div id
="header"><div id
="header-inner" class="clearfix">
110 <a href
="<?php print $front_page; ?>" title
="<?php print t('Home'); ?>" rel
="home" id
="logo"><img src
="<?php print $logo; ?>" alt
="<?php print t('Home'); ?>" /></a
>
113 <?php
if ($site_name || $site_slogan): ?
>
114 <div id
="name-and-slogan">
115 <?php
if ($site_name): ?
>
116 <?php
if ($title): ?
>
117 <div id
="site-name"><strong
>
118 <a href
="<?php print $front_page; ?>" title
="<?php print t('Home'); ?>" rel
="home">
119 <?php
print $site_name; ?
>
122 <?php
else: /* Use h1 when the content title is empty */ ?
>
124 <a href
="<?php print $front_page; ?>" title
="<?php print t('Home'); ?>" rel
="home">
125 <?php
print $site_name; ?
>
131 <?php
if ($site_slogan): ?
>
132 <div id
="site-slogan"><?php
print $site_slogan; ?
></div
>
134 </div
> <!-- /#name-and-slogan -->
137 <?php
if ($search_box): ?
>
138 <div id
="search-box"><?php
print $search_box; ?
></div
>
141 <?php
if ($header): ?
>
142 <div id
="header-blocks" class="region region-header">
143 <?php
print $header; ?
>
144 </div
> <!-- /#header-blocks -->
147 </div
></div
> <!-- /#header-inner, /#header -->
149 <div id
="main"><div id
="main-inner" class="clearfix<?php if ($primary_links || $secondary_links || $navbar) { print ' with-navbar'; } ?>">
151 <div id
="content"><div id
="content-inner">
153 <?php
if ($mission): ?
>
154 <div id
="mission"><?php
print $mission; ?
></div
>
157 <?php
if ($content_top): ?
>
158 <div id
="content-top" class="region region-content_top">
159 <?php
print $content_top; ?
>
160 </div
> <!-- /#content-top -->
163 <?php
if ($breadcrumb || $title || $tabs || $help || $messages): ?
>
164 <div id
="content-header">
165 <?php
print $breadcrumb; ?
>
166 <?php
if ($title): ?
>
167 <h1
class="title"><?php
print $title; ?
></h1
>
169 <?php
print $messages; ?
>
171 <div
class="tabs"><?php
print $tabs; ?
></div
>
173 <?php
print $help; ?
>
174 </div
> <!-- /#content-header -->
177 <div id
="content-area">
178 <?php
print $content; ?
>
181 <?php
if ($feed_icons): ?
>
182 <div
class="feed-icons"><?php
print $feed_icons; ?
></div
>
185 <?php
if ($content_bottom): ?
>
186 <div id
="content-bottom" class="region region-content_bottom">
187 <?php
print $content_bottom; ?
>
188 </div
> <!-- /#content-bottom -->
191 </div
></div
> <!-- /#content-inner, /#content -->
193 <?php
if ($primary_links || $secondary_links || $navbar): ?
>
194 <div id
="navbar"><div id
="navbar-inner" class="clearfix region region-navbar">
196 <a name
="navigation" id
="navigation"></a
>
198 <?php
if ($primary_links): ?
>
200 <?php
print theme('links', $primary_links); ?
>
201 </div
> <!-- /#primary -->
204 <?php
if ($secondary_links): ?
>
206 <?php
print theme('links', $secondary_links); ?
>
207 </div
> <!-- /#secondary -->
210 <?php
print $navbar; ?
>
212 </div
></div
> <!-- /#navbar-inner, /#navbar -->
216 <div id
="sidebar-first"><div id
="sidebar-first-inner" class="region region-sidebar-first">
217 <?php
print $left; ?
>
218 </div
></div
> <!-- /#sidebar-first-inner, /#sidebar-first -->
221 <?php
if ($right): ?
>
222 <div id
="sidebar-second"><div id
="sidebar-second-inner" class="region region-sidebar-second">
223 <?php
print $right; ?
>
224 </div
></div
> <!-- /#sidebar-second-inner, /#sidebar-second -->
227 </div
></div
> <!-- /#main-inner, /#main -->
229 <?php
if ($footer || $footer_message): ?
>
230 <div id
="footer"><div id
="footer-inner" class="region region-footer">
232 <?php
if ($footer_message): ?
>
233 <div id
="footer-message"><?php
print $footer_message; ?
></div
>
236 <?php
print $footer; ?
>
238 </div
></div
> <!-- /#footer-inner, /#footer -->
241 </div
></div
> <!-- /#page-inner, /#page -->
243 <?php
if ($closure_region): ?
>
244 <div id
="closure-blocks" class="region region-closure"><?php
print $closure_region; ?
></div
>
247 <?php
print $closure; ?
>