1
|
<?php
|
2
|
/**
|
3
|
* @file
|
4
|
* Zen theme's implementation to display a single Drupal page.
|
5
|
*
|
6
|
* Available variables:
|
7
|
*
|
8
|
* General utility variables:
|
9
|
* - $base_path: The base URL path of the Drupal installation. At the very
|
10
|
* least, this will always default to /.
|
11
|
* - $directory: The directory the template is located in, e.g. modules/system
|
12
|
* or themes/bartik.
|
13
|
* - $is_front: TRUE if the current page is the front page.
|
14
|
* - $logged_in: TRUE if the user is registered and signed in.
|
15
|
* - $is_admin: TRUE if the user has permission to access administration pages.
|
16
|
*
|
17
|
* Site identity:
|
18
|
* - $front_page: The URL of the front page. Use this instead of $base_path,
|
19
|
* when linking to the front page. This includes the language domain or
|
20
|
* prefix.
|
21
|
* - $logo: The path to the logo image, as defined in theme configuration.
|
22
|
* - $site_name: The name of the site, empty when display has been disabled
|
23
|
* in theme settings.
|
24
|
* - $site_slogan: The slogan of the site, empty when display has been disabled
|
25
|
* in theme settings.
|
26
|
*
|
27
|
* Navigation:
|
28
|
* - $main_menu (array): An array containing the Main menu links for the
|
29
|
* site, if they have been configured.
|
30
|
* - $secondary_menu (array): An array containing the Secondary menu links for
|
31
|
* the site, if they have been configured.
|
32
|
* - $secondary_menu_heading: The title of the menu used by the secondary links.
|
33
|
* - $breadcrumb: The breadcrumb trail for the current page.
|
34
|
*
|
35
|
* Page content (in order of occurrence in the default page.tpl.php):
|
36
|
* - $title_prefix (array): An array containing additional output populated by
|
37
|
* modules, intended to be displayed in front of the main title tag that
|
38
|
* appears in the template.
|
39
|
* - $title: The page title, for use in the actual HTML content.
|
40
|
* - $title_suffix (array): An array containing additional output populated by
|
41
|
* modules, intended to be displayed after the main title tag that appears in
|
42
|
* the template.
|
43
|
* - $messages: HTML for status and error messages. Should be displayed
|
44
|
* prominently.
|
45
|
* - $tabs (array): Tabs linking to any sub-pages beneath the current page
|
46
|
* (e.g., the view and edit tabs when displaying a node).
|
47
|
* - $action_links (array): Actions local to the page, such as 'Add menu' on the
|
48
|
* menu administration interface.
|
49
|
* - $feed_icons: A string of all feed icons for the current page.
|
50
|
* - $node: The node object, if there is an automatically-loaded node
|
51
|
* associated with the page, and the node ID is the second argument
|
52
|
* in the page's path (e.g. node/12345 and node/12345/revisions, but not
|
53
|
* comment/reply/12345).
|
54
|
* - $banner_url: from zen_dataportal theme-settings.php
|
55
|
* - $page_background_url: from zen_dataportal theme-settings.php
|
56
|
*
|
57
|
* Regions:
|
58
|
* - $page['header']: Items for the header region.
|
59
|
* - $page['navigation']: Items for the navigation region, below the main menu (if any).
|
60
|
* - $page['help']: Dynamic help text, mostly for admin pages.
|
61
|
* - $page['highlighted']: Items for the highlighted content region.
|
62
|
* - $page['content']: The main content of the current page.
|
63
|
* - $page['sidebar_first']: Items for the first sidebar.
|
64
|
* - $page['sidebar_second']: Items for the second sidebar.
|
65
|
* - $page['footer']: Items for the footer region.
|
66
|
* - $page['bottom']: Items to appear at the bottom of the page below the footer.
|
67
|
*
|
68
|
* @see template_preprocess()
|
69
|
* @see template_preprocess_page()
|
70
|
* @see zen_preprocess_page()
|
71
|
* @see template_process()
|
72
|
*/
|
73
|
?>
|
74
|
|
75
|
<div id="page">
|
76
|
|
77
|
<header id="header" role="banner">
|
78
|
<?php if ($logo): ?>
|
79
|
<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>
|
80
|
<?php endif; ?>
|
81
|
|
82
|
<?php if ($site_name || $site_slogan): ?>
|
83
|
<hgroup id="name-and-slogan">
|
84
|
<?php if ($site_name): ?>
|
85
|
<h1 id="site-name">
|
86
|
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
|
87
|
</h1>
|
88
|
<?php endif; ?>
|
89
|
|
90
|
<?php if ($site_slogan): ?>
|
91
|
<h2 id="site-slogan"><?php print $site_slogan; ?></h2>
|
92
|
<?php endif; ?>
|
93
|
</hgroup><!-- /#name-and-slogan -->
|
94
|
<?php endif; ?>
|
95
|
|
96
|
<?php if ($secondary_menu): ?>
|
97
|
<nav id="secondary-menu" role="navigation">
|
98
|
<?php print theme('links__system_secondary_menu', array(
|
99
|
'links' => $secondary_menu,
|
100
|
'attributes' => array(
|
101
|
'class' => array('links', 'inline', 'clearfix'),
|
102
|
),
|
103
|
'heading' => array(
|
104
|
'text' => $secondary_menu_heading,
|
105
|
'level' => 'h2',
|
106
|
'class' => array('element-invisible'),
|
107
|
),
|
108
|
)); ?>
|
109
|
</nav>
|
110
|
<?php endif; ?>
|
111
|
|
112
|
<?php print render($page['header']); ?>
|
113
|
</header>
|
114
|
|
115
|
<div id="main">
|
116
|
|
117
|
<div id="content" class="column" role="main">
|
118
|
<?php print render($page['highlighted']); ?>
|
119
|
<?php print $breadcrumb; ?>
|
120
|
<a id="main-content"></a>
|
121
|
<?php print render($title_prefix); ?>
|
122
|
<?php if ($title): ?>
|
123
|
<h1 class="title" id="page-title"><?php print $title; ?></h1>
|
124
|
<?php endif; ?>
|
125
|
<?php print render($title_suffix); ?>
|
126
|
<?php print $messages; ?>
|
127
|
<?php print render($tabs); ?>
|
128
|
<?php print render($page['help']); ?>
|
129
|
<?php if ($action_links): ?>
|
130
|
<ul class="action-links"><?php print render($action_links); ?></ul>
|
131
|
<?php endif; ?>
|
132
|
<?php print render($page['content']); ?>
|
133
|
<?php print $feed_icons; ?>
|
134
|
</div><!-- /#content -->
|
135
|
|
136
|
<div id="navigation">
|
137
|
|
138
|
<?php if ($main_menu): ?>
|
139
|
<nav id="main-menu" role="navigation">
|
140
|
<?php
|
141
|
// This code snippet is hard to modify. We recommend turning off the
|
142
|
// "Main menu" on your sub-theme's settings form, deleting this PHP
|
143
|
// code block, and, instead, using the "Menu block" module.
|
144
|
// @see http://drupal.org/project/menu_block
|
145
|
print theme('links__system_main_menu', array(
|
146
|
'links' => $main_menu,
|
147
|
'attributes' => array(
|
148
|
'class' => array('links', 'inline', 'clearfix'),
|
149
|
),
|
150
|
'heading' => array(
|
151
|
'text' => t('Main menu'),
|
152
|
'level' => 'h2',
|
153
|
'class' => array('element-invisible'),
|
154
|
),
|
155
|
)); ?>
|
156
|
</nav>
|
157
|
<?php endif; ?>
|
158
|
|
159
|
<?php print render($page['navigation']); ?>
|
160
|
|
161
|
</div><!-- /#navigation -->
|
162
|
|
163
|
<?php
|
164
|
// Render the sidebars to see if there's anything in them.
|
165
|
$sidebar_first = render($page['sidebar_first']);
|
166
|
$sidebar_second = render($page['sidebar_second']);
|
167
|
?>
|
168
|
|
169
|
<?php if ($sidebar_first || $sidebar_second): ?>
|
170
|
<aside class="sidebars">
|
171
|
<?php print $sidebar_first; ?>
|
172
|
<?php print $sidebar_second; ?>
|
173
|
</aside><!-- /.sidebars -->
|
174
|
<?php endif; ?>
|
175
|
|
176
|
</div><!-- /#main -->
|
177
|
|
178
|
<?php print render($page['footer']); ?>
|
179
|
|
180
|
</div><!-- /#page -->
|
181
|
|
182
|
<?php print render($page['bottom']); ?>
|