Projet

Général

Profil

Paste
Télécharger (9,99 ko) Statistiques
| Branche: | Révision:

root / drupal7 / themes / bartik / templates / page.tpl.php @ 76597ebf

1
<?php
2

    
3
/**
4
 * @file
5
 * Bartik's theme implementation to display a single Drupal page.
6
 *
7
 * The doctype, html, head and body tags are not in this template. Instead they
8
 * can be found in the html.tpl.php template normally located in the
9
 * modules/system directory.
10
 *
11
 * Available variables:
12
 *
13
 * General utility variables:
14
 * - $base_path: The base URL path of the Drupal installation. At the very
15
 *   least, this will always default to /.
16
 * - $directory: The directory the template is located in, e.g. modules/system
17
 *   or themes/bartik.
18
 * - $is_front: TRUE if the current page is the front page.
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
 * Site identity:
23
 * - $front_page: The URL of the front page. Use this instead of $base_path,
24
 *   when linking to the front page. This includes the language domain or
25
 *   prefix.
26
 * - $logo: The path to the logo image, as defined in theme configuration.
27
 * - $site_name: The name of the site, empty when display has been disabled
28
 *   in theme settings.
29
 * - $site_slogan: The slogan of the site, empty when display has been disabled
30
 *   in theme settings.
31
 * - $hide_site_name: TRUE if the site name has been toggled off on the theme
32
 *   settings page. If hidden, the "element-invisible" class is added to make
33
 *   the site name visually hidden, but still accessible.
34
 * - $hide_site_slogan: TRUE if the site slogan has been toggled off on the
35
 *   theme settings page. If hidden, the "element-invisible" class is added to
36
 *   make the site slogan visually hidden, but still accessible.
37
 *
38
 * Navigation:
39
 * - $main_menu (array): An array containing the Main menu links for the
40
 *   site, if they have been configured.
41
 * - $secondary_menu (array): An array containing the Secondary menu links for
42
 *   the site, if they have been configured.
43
 * - $breadcrumb: The breadcrumb trail for the current page.
44
 *
45
 * Page content (in order of occurrence in the default page.tpl.php):
46
 * - $title_prefix (array): An array containing additional output populated by
47
 *   modules, intended to be displayed in front of the main title tag that
48
 *   appears in the template.
49
 * - $title: The page title, for use in the actual HTML content.
50
 * - $title_suffix (array): An array containing additional output populated by
51
 *   modules, intended to be displayed after the main title tag that appears in
52
 *   the template.
53
 * - $messages: HTML for status and error messages. Should be displayed
54
 *   prominently.
55
 * - $tabs (array): Tabs linking to any sub-pages beneath the current page
56
 *   (e.g., the view and edit tabs when displaying a node).
57
 * - $action_links (array): Actions local to the page, such as 'Add menu' on the
58
 *   menu administration interface.
59
 * - $feed_icons: A string of all feed icons for the current page.
60
 * - $node: The node object, if there is an automatically-loaded node
61
 *   associated with the page, and the node ID is the second argument
62
 *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
63
 *   comment/reply/12345).
64
 *
65
 * Regions:
66
 * - $page['header']: Items for the header region.
67
 * - $page['featured']: Items for the featured region.
68
 * - $page['highlighted']: Items for the highlighted content region.
69
 * - $page['help']: Dynamic help text, mostly for admin pages.
70
 * - $page['content']: The main content of the current page.
71
 * - $page['sidebar_first']: Items for the first sidebar.
72
 * - $page['triptych_first']: Items for the first triptych.
73
 * - $page['triptych_middle']: Items for the middle triptych.
74
 * - $page['triptych_last']: Items for the last triptych.
75
 * - $page['footer_firstcolumn']: Items for the first footer column.
76
 * - $page['footer_secondcolumn']: Items for the second footer column.
77
 * - $page['footer_thirdcolumn']: Items for the third footer column.
78
 * - $page['footer_fourthcolumn']: Items for the fourth footer column.
79
 * - $page['footer']: Items for the footer region.
80
 *
81
 * @see template_preprocess()
82
 * @see template_preprocess_page()
83
 * @see template_process()
84
 * @see bartik_process_page()
85
 * @see html.tpl.php
86
 */
87
?>
88
<div id="page-wrapper"><div id="page">
89

    
90
  <div id="header" class="<?php print $secondary_menu ? 'with-secondary-menu': 'without-secondary-menu'; ?>"><div class="section clearfix">
91

    
92
    <?php if ($logo): ?>
93
      <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
94
        <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
95
      </a>
96
    <?php endif; ?>
97

    
98
    <?php if ($site_name || $site_slogan): ?>
99
      <div id="name-and-slogan"<?php if ($hide_site_name && $hide_site_slogan) { print ' class="element-invisible"'; } ?>>
100

    
101
        <?php if ($site_name): ?>
102
          <?php if ($title): ?>
103
            <div id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
104
              <strong>
105
                <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
106
              </strong>
107
            </div>
108
          <?php else: /* Use h1 when the content title is empty */ ?>
109
            <h1 id="site-name"<?php if ($hide_site_name) { print ' class="element-invisible"'; } ?>>
110
              <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
111
            </h1>
112
          <?php endif; ?>
113
        <?php endif; ?>
114

    
115
        <?php if ($site_slogan): ?>
116
          <div id="site-slogan"<?php if ($hide_site_slogan) { print ' class="element-invisible"'; } ?>>
117
            <?php print $site_slogan; ?>
118
          </div>
119
        <?php endif; ?>
120

    
121
      </div> <!-- /#name-and-slogan -->
122
    <?php endif; ?>
123

    
124
    <?php print render($page['header']); ?>
125

    
126
    <?php if ($main_menu): ?>
127
      <div id="main-menu" class="navigation">
128
        <?php print theme('links__system_main_menu', array(
129
          'links' => $main_menu,
130
          'attributes' => array(
131
            'id' => 'main-menu-links',
132
            'class' => array('links', 'clearfix'),
133
          ),
134
          'heading' => array(
135
            'text' => t('Main menu'),
136
            'level' => 'h2',
137
            'class' => array('element-invisible'),
138
          ),
139
        )); ?>
140
      </div> <!-- /#main-menu -->
141
    <?php endif; ?>
142

    
143
    <?php if ($secondary_menu): ?>
144
      <div id="secondary-menu" class="navigation">
145
        <?php print theme('links__system_secondary_menu', array(
146
          'links' => $secondary_menu,
147
          'attributes' => array(
148
            'id' => 'secondary-menu-links',
149
            'class' => array('links', 'inline', 'clearfix'),
150
          ),
151
          'heading' => array(
152
            'text' => t('Secondary menu'),
153
            'level' => 'h2',
154
            'class' => array('element-invisible'),
155
          ),
156
        )); ?>
157
      </div> <!-- /#secondary-menu -->
158
    <?php endif; ?>
159

    
160
  </div></div> <!-- /.section, /#header -->
161

    
162
  <?php if ($messages): ?>
163
    <div id="messages"><div class="section clearfix">
164
      <?php print $messages; ?>
165
    </div></div> <!-- /.section, /#messages -->
166
  <?php endif; ?>
167

    
168
  <?php if ($page['featured']): ?>
169
    <div id="featured"><div class="section clearfix">
170
      <?php print render($page['featured']); ?>
171
    </div></div> <!-- /.section, /#featured -->
172
  <?php endif; ?>
173

    
174
  <div id="main-wrapper" class="clearfix"><div id="main" class="clearfix">
175

    
176
    <?php if ($breadcrumb): ?>
177
      <div id="breadcrumb"><?php print $breadcrumb; ?></div>
178
    <?php endif; ?>
179

    
180
    <?php if ($page['sidebar_first']): ?>
181
      <div id="sidebar-first" class="column sidebar"><div class="section">
182
        <?php print render($page['sidebar_first']); ?>
183
      </div></div> <!-- /.section, /#sidebar-first -->
184
    <?php endif; ?>
185

    
186
    <div id="content" class="column"><div class="section">
187
      <?php if ($page['highlighted']): ?><div id="highlighted"><?php print render($page['highlighted']); ?></div><?php endif; ?>
188
      <a id="main-content"></a>
189
      <?php print render($title_prefix); ?>
190
      <?php if ($title): ?>
191
        <h1 class="title" id="page-title">
192
          <?php print $title; ?>
193
        </h1>
194
      <?php endif; ?>
195
      <?php print render($title_suffix); ?>
196
      <?php if ($tabs): ?>
197
        <div class="tabs">
198
          <?php print render($tabs); ?>
199
        </div>
200
      <?php endif; ?>
201
      <?php print render($page['help']); ?>
202
      <?php if ($action_links): ?>
203
        <ul class="action-links">
204
          <?php print render($action_links); ?>
205
        </ul>
206
      <?php endif; ?>
207
      <?php print render($page['content']); ?>
208
      <?php print $feed_icons; ?>
209

    
210
    </div></div> <!-- /.section, /#content -->
211

    
212
    <?php if ($page['sidebar_second']): ?>
213
      <div id="sidebar-second" class="column sidebar"><div class="section">
214
        <?php print render($page['sidebar_second']); ?>
215
      </div></div> <!-- /.section, /#sidebar-second -->
216
    <?php endif; ?>
217

    
218
  </div></div> <!-- /#main, /#main-wrapper -->
219

    
220
  <?php if ($page['triptych_first'] || $page['triptych_middle'] || $page['triptych_last']): ?>
221
    <div id="triptych-wrapper"><div id="triptych" class="clearfix">
222
      <?php print render($page['triptych_first']); ?>
223
      <?php print render($page['triptych_middle']); ?>
224
      <?php print render($page['triptych_last']); ?>
225
    </div></div> <!-- /#triptych, /#triptych-wrapper -->
226
  <?php endif; ?>
227

    
228
  <div id="footer-wrapper"><div class="section">
229

    
230
    <?php if ($page['footer_firstcolumn'] || $page['footer_secondcolumn'] || $page['footer_thirdcolumn'] || $page['footer_fourthcolumn']): ?>
231
      <div id="footer-columns" class="clearfix">
232
        <?php print render($page['footer_firstcolumn']); ?>
233
        <?php print render($page['footer_secondcolumn']); ?>
234
        <?php print render($page['footer_thirdcolumn']); ?>
235
        <?php print render($page['footer_fourthcolumn']); ?>
236
      </div> <!-- /#footer-columns -->
237
    <?php endif; ?>
238

    
239
    <?php if ($page['footer']): ?>
240
      <div id="footer" class="clearfix">
241
        <?php print render($page['footer']); ?>
242
      </div> <!-- /#footer -->
243
    <?php endif; ?>
244

    
245
  </div></div> <!-- /.section, /#footer-wrapper -->
246

    
247
</div></div> <!-- /#page, /#page-wrapper -->