Issue #2088687: Change base to init in documentation.
[project/zen.git] / templates / page.tpl.php
1 <?php
2 /**
3 * @file
4 * Returns the HTML for a single Drupal page.
5 *
6 * Complete documentation for this file is available online.
7 * @see https://drupal.org/node/1728148
8 */
9 ?>
10
11 <div id="page">
12
13 <header class="header" id="header" role="banner">
14
15 <?php if ($logo): ?>
16 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" class="header__logo" id="logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" class="header__logo-image" /></a>
17 <?php endif; ?>
18
19 <?php if ($site_name || $site_slogan): ?>
20 <div class="header__name-and-slogan" id="name-and-slogan">
21 <?php if ($site_name): ?>
22 <h1 class="header__site-name" id="site-name">
23 <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" class="header__site-link" rel="home"><span><?php print $site_name; ?></span></a>
24 </h1>
25 <?php endif; ?>
26
27 <?php if ($site_slogan): ?>
28 <div class="header__site-slogan" id="site-slogan"><?php print $site_slogan; ?></div>
29 <?php endif; ?>
30 </div>
31 <?php endif; ?>
32
33 <?php if ($secondary_menu): ?>
34 <nav class="header__secondary-menu" id="secondary-menu" role="navigation">
35 <?php print theme('links__system_secondary_menu', array(
36 'links' => $secondary_menu,
37 'attributes' => array(
38 'class' => array('links', 'inline', 'clearfix'),
39 ),
40 'heading' => array(
41 'text' => $secondary_menu_heading,
42 'level' => 'h2',
43 'class' => array('element-invisible'),
44 ),
45 )); ?>
46 </nav>
47 <?php endif; ?>
48
49 <?php print render($page['header']); ?>
50
51 </header>
52
53 <div id="main">
54
55 <div id="content" class="column" role="main">
56 <?php print render($page['highlighted']); ?>
57 <?php print $breadcrumb; ?>
58 <a id="main-content"></a>
59 <?php print render($title_prefix); ?>
60 <?php if ($title): ?>
61 <h1 class="page__title title" id="page-title"><?php print $title; ?></h1>
62 <?php endif; ?>
63 <?php print render($title_suffix); ?>
64 <?php print $messages; ?>
65 <?php print render($tabs); ?>
66 <?php print render($page['help']); ?>
67 <?php if ($action_links): ?>
68 <ul class="action-links"><?php print render($action_links); ?></ul>
69 <?php endif; ?>
70 <?php print render($page['content']); ?>
71 <?php print $feed_icons; ?>
72 </div>
73
74 <div id="navigation">
75
76 <?php if ($main_menu): ?>
77 <nav id="main-menu" role="navigation" tabindex="-1">
78 <?php
79 // This code snippet is hard to modify. We recommend turning off the
80 // "Main menu" on your sub-theme's settings form, deleting this PHP
81 // code block, and, instead, using the "Menu block" module.
82 // @see https://drupal.org/project/menu_block
83 print theme('links__system_main_menu', array(
84 'links' => $main_menu,
85 'attributes' => array(
86 'class' => array('links', 'inline', 'clearfix'),
87 ),
88 'heading' => array(
89 'text' => t('Main menu'),
90 'level' => 'h2',
91 'class' => array('element-invisible'),
92 ),
93 )); ?>
94 </nav>
95 <?php endif; ?>
96
97 <?php print render($page['navigation']); ?>
98
99 </div>
100
101 <?php
102 // Render the sidebars to see if there's anything in them.
103 $sidebar_first = render($page['sidebar_first']);
104 $sidebar_second = render($page['sidebar_second']);
105 ?>
106
107 <?php if ($sidebar_first || $sidebar_second): ?>
108 <aside class="sidebars">
109 <?php print $sidebar_first; ?>
110 <?php print $sidebar_second; ?>
111 </aside>
112 <?php endif; ?>
113
114 </div>
115
116 <?php print render($page['footer']); ?>
117
118 </div>
119
120 <?php print render($page['bottom']); ?>