root / drupal7 / sites / all / themes / bootstrap / templates / system / page.tpl.php @ 1f623f01
1 |
<?php
|
---|---|
2 |
/**
|
3 |
* @file
|
4 |
* Default theme implementation to display a single Drupal page.
|
5 |
*
|
6 |
* The doctype, html, head and body tags are not in this template. Instead they
|
7 |
* can be found in the html.tpl.php template in this directory.
|
8 |
*
|
9 |
* Available variables:
|
10 |
*
|
11 |
* General utility variables:
|
12 |
* - $base_path: The base URL path of the Drupal installation. At the very
|
13 |
* least, this will always default to /.
|
14 |
* - $directory: The directory the template is located in, e.g. modules/system
|
15 |
* or themes/bartik.
|
16 |
* - $is_front: TRUE if the current page is the front page.
|
17 |
* - $logged_in: TRUE if the user is registered and signed in.
|
18 |
* - $is_admin: TRUE if the user has permission to access administration pages.
|
19 |
*
|
20 |
* Site identity:
|
21 |
* - $front_page: The URL of the front page. Use this instead of $base_path,
|
22 |
* when linking to the front page. This includes the language domain or
|
23 |
* prefix.
|
24 |
* - $logo: The path to the logo image, as defined in theme configuration.
|
25 |
* - $site_name: The name of the site, empty when display has been disabled
|
26 |
* in theme settings.
|
27 |
* - $site_slogan: The slogan of the site, empty when display has been disabled
|
28 |
* in theme settings.
|
29 |
*
|
30 |
* Navigation:
|
31 |
* - $main_menu (array): An array containing the Main menu links for the
|
32 |
* site, if they have been configured.
|
33 |
* - $secondary_menu (array): An array containing the Secondary menu links for
|
34 |
* the site, if they have been configured.
|
35 |
* - $breadcrumb: The breadcrumb trail for the current page.
|
36 |
*
|
37 |
* Page content (in order of occurrence in the default page.tpl.php):
|
38 |
* - $title_prefix (array): An array containing additional output populated by
|
39 |
* modules, intended to be displayed in front of the main title tag that
|
40 |
* appears in the template.
|
41 |
* - $title: The page title, for use in the actual HTML content.
|
42 |
* - $title_suffix (array): An array containing additional output populated by
|
43 |
* modules, intended to be displayed after the main title tag that appears in
|
44 |
* the template.
|
45 |
* - $messages: HTML for status and error messages. Should be displayed
|
46 |
* prominently.
|
47 |
* - $tabs (array): Tabs linking to any sub-pages beneath the current page
|
48 |
* (e.g., the view and edit tabs when displaying a node).
|
49 |
* - $action_links (array): Actions local to the page, such as 'Add menu' on the
|
50 |
* menu administration interface.
|
51 |
* - $feed_icons: A string of all feed icons for the current page.
|
52 |
* - $node: The node object, if there is an automatically-loaded node
|
53 |
* associated with the page, and the node ID is the second argument
|
54 |
* in the page's path (e.g. node/12345 and node/12345/revisions, but not
|
55 |
* comment/reply/12345).
|
56 |
*
|
57 |
* Regions:
|
58 |
* - $page['help']: Dynamic help text, mostly for admin pages.
|
59 |
* - $page['highlighted']: Items for the highlighted content region.
|
60 |
* - $page['content']: The main content of the current page.
|
61 |
* - $page['sidebar_first']: Items for the first sidebar.
|
62 |
* - $page['sidebar_second']: Items for the second sidebar.
|
63 |
* - $page['header']: Items for the header region.
|
64 |
* - $page['footer']: Items for the footer region.
|
65 |
*
|
66 |
* @see bootstrap_preprocess_page()
|
67 |
* @see template_preprocess()
|
68 |
* @see template_preprocess_page()
|
69 |
* @see bootstrap_process_page()
|
70 |
* @see template_process()
|
71 |
* @see html.tpl.php
|
72 |
*
|
73 |
* @ingroup templates
|
74 |
*/
|
75 |
?>
|
76 |
<header id="navbar" role="banner" class="<?php print $navbar_classes; ?>"> |
77 |
<div class="<?php print $container_class; ?>"> |
78 |
<div class="navbar-header"> |
79 |
<?php if ($logo): ?> |
80 |
<a class="logo navbar-btn pull-left" href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"> |
81 |
<img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /> |
82 |
</a>
|
83 |
<?php endif; ?> |
84 |
|
85 |
<?php if (!empty($site_name)): ?> |
86 |
<a class="name navbar-brand" href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a> |
87 |
<?php endif; ?> |
88 |
|
89 |
<?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?> |
90 |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse"> |
91 |
<span class="sr-only"><?php print t('Toggle navigation'); ?></span> |
92 |
<span class="icon-bar"></span> |
93 |
<span class="icon-bar"></span> |
94 |
<span class="icon-bar"></span> |
95 |
</button>
|
96 |
<?php endif; ?> |
97 |
</div>
|
98 |
|
99 |
<?php if (!empty($primary_nav) || !empty($secondary_nav) || !empty($page['navigation'])): ?> |
100 |
<div class="navbar-collapse collapse" id="navbar-collapse"> |
101 |
<nav role="navigation"> |
102 |
<?php if (!empty($primary_nav)): ?> |
103 |
<?php print render($primary_nav); ?> |
104 |
<?php endif; ?> |
105 |
<?php if (!empty($secondary_nav)): ?> |
106 |
<?php print render($secondary_nav); ?> |
107 |
<?php endif; ?> |
108 |
<?php if (!empty($page['navigation'])): ?> |
109 |
<?php print render($page['navigation']); ?> |
110 |
<?php endif; ?> |
111 |
</nav>
|
112 |
</div>
|
113 |
<?php endif; ?> |
114 |
</div>
|
115 |
</header>
|
116 |
|
117 |
<div class="main-container <?php print $container_class; ?>"> |
118 |
|
119 |
<header role="banner" id="page-header"> |
120 |
<?php if (!empty($site_slogan)): ?> |
121 |
<p class="lead"><?php print $site_slogan; ?></p> |
122 |
<?php endif; ?> |
123 |
|
124 |
<?php print render($page['header']); ?> |
125 |
</header> <!-- /#page-header --> |
126 |
|
127 |
<div class="row"> |
128 |
|
129 |
<?php if (!empty($page['sidebar_first'])): ?> |
130 |
<aside class="col-sm-3" role="complementary"> |
131 |
<?php print render($page['sidebar_first']); ?> |
132 |
</aside> <!-- /#sidebar-first --> |
133 |
<?php endif; ?> |
134 |
|
135 |
<section<?php print $content_column_class; ?>> |
136 |
<?php if (!empty($page['highlighted'])): ?> |
137 |
<div class="highlighted jumbotron"><?php print render($page['highlighted']); ?></div> |
138 |
<?php endif; ?> |
139 |
<?php if (!empty($breadcrumb)): print $breadcrumb; endif;?> |
140 |
<a id="main-content"></a> |
141 |
<?php print render($title_prefix); ?> |
142 |
<?php if (!empty($title)): ?> |
143 |
<h1 class="page-header"><?php print $title; ?></h1> |
144 |
<?php endif; ?> |
145 |
<?php print render($title_suffix); ?> |
146 |
<?php print $messages; ?> |
147 |
<?php if (!empty($tabs)): ?> |
148 |
<?php print render($tabs); ?> |
149 |
<?php endif; ?> |
150 |
<?php if (!empty($page['help'])): ?> |
151 |
<?php print render($page['help']); ?> |
152 |
<?php endif; ?> |
153 |
<?php if (!empty($action_links)): ?> |
154 |
<ul class="action-links"><?php print render($action_links); ?></ul> |
155 |
<?php endif; ?> |
156 |
<?php print render($page['content']); ?> |
157 |
</section>
|
158 |
|
159 |
<?php if (!empty($page['sidebar_second'])): ?> |
160 |
<aside class="col-sm-3" role="complementary"> |
161 |
<?php print render($page['sidebar_second']); ?> |
162 |
</aside> <!-- /#sidebar-second --> |
163 |
<?php endif; ?> |
164 |
|
165 |
</div>
|
166 |
</div>
|
167 |
|
168 |
<?php if (!empty($page['footer'])): ?> |
169 |
<footer class="footer <?php print $container_class; ?>"> |
170 |
<?php print render($page['footer']); ?> |
171 |
</footer>
|
172 |
<?php endif; ?> |