Projet

Général

Profil

Paste
Télécharger (8,79 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / adaptivetheme / at_core / templates / page.tpl.php @ 74f6bef0

1
<?php
2
/**
3
 * @file
4
 * Adaptivetheme implementation to display a single Drupal page.
5
 *
6
 * Available variables:
7
 *
8
 * Adaptivetheme supplied variables:
9
 * - $site_logo: Themed logo - linked to front with alt attribute.
10
 * - $site_name: Site name linked to the homepage.
11
 * - $site_name_unlinked: Site name without any link.
12
 * - $hide_site_name: Toggles the visibility of the site name.
13
 * - $visibility: Holds the class .element-invisible or is empty.
14
 * - $primary_navigation: Themed Main menu.
15
 * - $secondary_navigation: Themed Secondary/user menu.
16
 * - $primary_local_tasks: Split local tasks - primary.
17
 * - $secondary_local_tasks: Split local tasks - secondary.
18
 * - $tag: Prints the wrapper element for the main content.
19
 * - $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return
20
 *   TRUE for mobile.  Note that tablets are also considered mobile devices.
21
 *   Returns NULL if the feature could not be detected.
22
 * - $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets.
23
 *   Returns NULL if the feature could not be detected.
24
 * - *_attributes: attributes for various site elements, usually holds id, class
25
 *   or role attributes.
26
 *
27
 * General utility variables:
28
 * - $base_path: The base URL path of the Drupal installation. At the very
29
 *   least, this will always default to /.
30
 * - $directory: The directory the template is located in, e.g. modules/system
31
 *   or themes/bartik.
32
 * - $is_front: TRUE if the current page is the front page.
33
 * - $logged_in: TRUE if the user is registered and signed in.
34
 * - $is_admin: TRUE if the user has permission to access administration pages.
35
 *
36
 * Site identity:
37
 * - $front_page: The URL of the front page. Use this instead of $base_path,
38
 *   when linking to the front page. This includes the language domain or
39
 *   prefix.
40
 * - $logo: The path to the logo image, as defined in theme configuration.
41
 * - $site_slogan: The slogan of the site, empty when display has been disabled
42
 *   in theme settings.
43
 *
44
 * Navigation:
45
 * - $main_menu (array): An array containing the Main menu links for the
46
 *   site, if they have been configured.
47
 * - $secondary_menu (array): An array containing the Secondary menu links for
48
 *   the site, if they have been configured.
49
 * - $breadcrumb: The breadcrumb trail for the current page.
50
 *
51
 * Page content (in order of occurrence in the default page.tpl.php):
52
 * - $title_prefix (array): An array containing additional output populated by
53
 *   modules, intended to be displayed in front of the main title tag that
54
 *   appears in the template.
55
 * - $title: The page title, for use in the actual HTML content.
56
 * - $title_suffix (array): An array containing additional output populated by
57
 *   modules, intended to be displayed after the main title tag that appears in
58
 *   the template.
59
 * - $messages: HTML for status and error messages. Should be displayed
60
 *   prominently.
61
 * - $tabs (array): Tabs linking to any sub-pages beneath the current page
62
 *   (e.g., the view and edit tabs when displaying a node).
63
 * - $action_links (array): Actions local to the page, such as 'Add menu' on the
64
 *   menu administration interface.
65
 * - $feed_icons: A string of all feed icons for the current page.
66
 * - $node: The node object, if there is an automatically-loaded node
67
 *   associated with the page, and the node ID is the second argument
68
 *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
69
 *   comment/reply/12345).
70
 *
71
 * Core Regions:
72
 * - $page['help']: Dynamic help text, mostly for admin pages.
73
 * - $page['highlighted']: Items for the highlighted content region.
74
 * - $page['content']: The main content of the current page.
75
 * - $page['sidebar_first']: Items for the first sidebar.
76
 * - $page['sidebar_second']: Items for the second sidebar.
77
 * - $page['header']: Items for the header region.
78
 * - $page['footer']: Items for the footer region.
79
 *
80
 * Adaptivetheme Regions:
81
 * - $page['leaderboard']: full width at the very top of the page
82
 * - $page['menu_bar']: menu blocks placed here will be styled horizontal
83
 * - $page['secondary_content']: full width just above the main columns
84
 * - $page['content_aside']: like a main content bottom region
85
 * - $page['tertiary_content']: full width just above the footer
86
 *
87
 * @see template_preprocess()
88
 * @see template_preprocess_page()
89
 * @see template_process()
90
 * @see adaptivetheme_preprocess_page()
91
 * @see adaptivetheme_process_page()
92
 */
93
?>
94
<div id="page-wrapper">
95
  <div id="page" class="container <?php print $classes; ?>">
96

    
97
    <!-- !Leaderboard Region -->
98
    <?php print render($page['leaderboard']); ?>
99

    
100
    <header<?php print $header_attributes; ?>>
101

    
102
      <?php if ($site_logo || $site_name || $site_slogan): ?>
103
        <!-- !Branding -->
104
        <div<?php print $branding_attributes; ?>>
105

    
106
          <?php if ($site_logo): ?>
107
            <div id="logo">
108
              <?php print $site_logo; ?>
109
            </div>
110
          <?php endif; ?>
111

    
112
          <?php if ($site_name || $site_slogan): ?>
113
            <!-- !Site name and Slogan -->
114
            <div<?php print $hgroup_attributes; ?>>
115

    
116
              <?php if ($site_name): ?>
117
                <h1<?php print $site_name_attributes; ?>><?php print $site_name; ?></h1>
118
              <?php endif; ?>
119

    
120
              <?php if ($site_slogan): ?>
121
                <h2<?php print $site_slogan_attributes; ?>><?php print $site_slogan; ?></h2>
122
              <?php endif; ?>
123

    
124
            </div>
125
          <?php endif; ?>
126

    
127
        </div>
128
      <?php endif; ?>
129

    
130
      <!-- !Header Region -->
131
      <?php print render($page['header']); ?>
132

    
133
    </header>
134

    
135
    <!-- !Navigation -->
136
    <?php print render($page['menu_bar']); ?>
137
    <?php if ($primary_navigation): print $primary_navigation; endif; ?>
138
    <?php if ($secondary_navigation): print $secondary_navigation; endif; ?>
139

    
140
    <!-- !Breadcrumbs -->
141
    <?php if ($breadcrumb): print $breadcrumb; endif; ?>
142

    
143
    <!-- !Messages and Help -->
144
    <?php print $messages; ?>
145
    <?php print render($page['help']); ?>
146

    
147
    <!-- !Secondary Content Region -->
148
    <?php print render($page['secondary_content']); ?>
149

    
150
    <div id="columns" class="columns clearfix">
151
      <main id="content-column" class="content-column" role="main">
152
        <div class="content-inner">
153

    
154
          <!-- !Highlighted region -->
155
          <?php print render($page['highlighted']); ?>
156

    
157
          <<?php print $tag; ?> id="main-content">
158

    
159
            <?php print render($title_prefix); // Does nothing by default in D7 core ?>
160

    
161
            <!-- !Main Content Header -->
162
            <?php if ($title || $primary_local_tasks || $secondary_local_tasks || $action_links = render($action_links)): ?>
163
              <header<?php print $content_header_attributes; ?>>
164

    
165
                <?php if ($title): ?>
166
                  <h1 id="page-title">
167
                    <?php print $title; ?>
168
                  </h1>
169
                <?php endif; ?>
170

    
171
                <?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
172
                  <div id="tasks">
173

    
174
                    <?php if ($primary_local_tasks): ?>
175
                      <ul class="tabs primary clearfix"><?php print render($primary_local_tasks); ?></ul>
176
                    <?php endif; ?>
177

    
178
                    <?php if ($secondary_local_tasks): ?>
179
                      <ul class="tabs secondary clearfix"><?php print render($secondary_local_tasks); ?></ul>
180
                    <?php endif; ?>
181

    
182
                    <?php if ($action_links = render($action_links)): ?>
183
                      <ul class="action-links clearfix"><?php print $action_links; ?></ul>
184
                    <?php endif; ?>
185

    
186
                  </div>
187
                <?php endif; ?>
188

    
189
              </header>
190
            <?php endif; ?>
191

    
192
            <!-- !Main Content -->
193
            <?php if ($content = render($page['content'])): ?>
194
              <div id="content" class="region">
195
                <?php print $content; ?>
196
              </div>
197
            <?php endif; ?>
198

    
199
            <!-- !Feed Icons -->
200
            <?php print $feed_icons; ?>
201

    
202
            <?php print render($title_suffix); // Prints page level contextual links ?>
203

    
204
          </<?php print $tag; ?>><!-- /end #main-content -->
205

    
206
          <!-- !Content Aside Region-->
207
          <?php print render($page['content_aside']); ?>
208

    
209
        </div><!-- /end .content-inner -->
210
      </main><!-- /end #content-column -->
211

    
212
      <!-- !Sidebar Regions -->
213
      <?php $sidebar_first = render($page['sidebar_first']); print $sidebar_first; ?>
214
      <?php $sidebar_second = render($page['sidebar_second']); print $sidebar_second; ?>
215

    
216
    </div><!-- /end #columns -->
217

    
218
    <!-- !Tertiary Content Region -->
219
    <?php print render($page['tertiary_content']); ?>
220

    
221
    <!-- !Footer -->
222
    <?php if ($page['footer'] || $attribution): ?>
223
      <footer<?php print $footer_attributes; ?>>
224
        <?php print render($page['footer']); ?>
225
        <?php print $attribution; ?>
226
      </footer>
227
    <?php endif; ?>
228

    
229
  </div>
230
</div>