Project

General

Profile

Download (7.04 KB) Statistics
| Branch: | Tag: | Revision:
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
 * - $page_attributes: will contain style with $page_background_url
57
 * - $header_attributes: will contain style with $page_background_url
58
 *
59
 * Regions:
60
 * - $page['header']: Items for the header region.
61
 * - $page['navigation']: Items for the navigation region, below the main menu (if any).
62
 * - $page['help']: Dynamic help text, mostly for admin pages.
63
 * - $page['highlighted']: Items for the highlighted content region.
64
 * - $page['content']: The main content of the current page.
65
 * - $page['sidebar_first']: Items for the first sidebar.
66
 * - $page['sidebar_second']: Items for the second sidebar.
67
 * - $page['footer']: Items for the footer region.
68
 * - $page['bottom']: Items to appear at the bottom of the page below the footer.
69
 *
70
 * @see template_preprocess()
71
 * @see template_preprocess_page()
72
 * @see zen_preprocess_page()
73
 * @see template_process()
74
 */
75
?>
76

    
77
<div id="page" <?php print $page_attributes; ?> >
78

    
79
  <header id="header" role="banner" <?php print $banner_attributes; ?>>
80
    <?php if ($logo): ?>
81
      <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>
82
    <?php endif; ?>
83

    
84
    <?php if ($site_name || $site_slogan): ?>
85
      <hgroup id="name-and-slogan">
86
        <?php if ($site_name): ?>
87
          <h1 id="site-name">
88
            <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a>
89
          </h1>
90
        <?php endif; ?>
91

    
92
        <?php if ($site_slogan): ?>
93
          <h2 id="site-slogan"><?php print $site_slogan; ?></h2>
94
        <?php endif; ?>
95
      </hgroup><!-- /#name-and-slogan -->
96
    <?php endif; ?>
97

    
98
    <?php if ($secondary_menu): ?>
99
      <nav id="secondary-menu" role="navigation">
100
        <?php print theme('links__system_secondary_menu', array(
101
          'links' => $secondary_menu,
102
          'attributes' => array(
103
            'class' => array('links', 'inline', 'clearfix'),
104
          ),
105
          'heading' => array(
106
            'text' => $secondary_menu_heading,
107
            'level' => 'h2',
108
            'class' => array('element-invisible'),
109
          ),
110
        )); ?>
111
      </nav>
112
    <?php endif; ?>
113

    
114
    <?php print render($page['header']); ?>
115
  </header>
116

    
117
  <div id="main">
118

    
119
    <div id="content" class="column" role="main">
120
      <?php print render($page['highlighted']); ?>
121
      <?php print $breadcrumb; ?>
122
      <a id="main-content"></a>
123
      <?php print render($title_prefix); ?>
124
      <?php if ($title): ?>
125
        <h1 class="title" id="page-title"><?php print $title; ?></h1>
126
      <?php endif; ?>
127
      <?php print render($title_suffix); ?>
128
      <?php print $messages; ?>
129
      <?php print render($tabs); ?>
130
      <?php print render($page['help']); ?>
131
      <?php if ($action_links): ?>
132
        <ul class="action-links"><?php print render($action_links); ?></ul>
133
      <?php endif; ?>
134
      <?php print render($page['content']); ?>
135
      <?php print $feed_icons; ?>
136
    </div><!-- /#content -->
137

    
138
    <div id="navigation">
139

    
140
      <?php if ($main_menu): ?>
141
        <nav id="main-menu" role="navigation">
142
          <?php
143
          // This code snippet is hard to modify. We recommend turning off the
144
          // "Main menu" on your sub-theme's settings form, deleting this PHP
145
          // code block, and, instead, using the "Menu block" module.
146
          // @see http://drupal.org/project/menu_block
147
          print theme('links__system_main_menu', array(
148
            'links' => $main_menu,
149
            'attributes' => array(
150
              'class' => array('links', 'inline', 'clearfix'),
151
            ),
152
            'heading' => array(
153
              'text' => t('Main menu'),
154
              'level' => 'h2',
155
              'class' => array('element-invisible'),
156
            ),
157
          )); ?>
158
        </nav>
159
      <?php endif; ?>
160

    
161
      <?php print render($page['navigation']); ?>
162

    
163
    </div><!-- /#navigation -->
164

    
165
    <?php
166
      // Render the sidebars to see if there's anything in them.
167
      $sidebar_first  = render($page['sidebar_first']);
168
      $sidebar_second = render($page['sidebar_second']);
169
    ?>
170

    
171
    <?php if ($sidebar_first || $sidebar_second): ?>
172
      <aside class="sidebars">
173
        <?php print $sidebar_first; ?>
174
        <?php print $sidebar_second; ?>
175
      </aside><!-- /.sidebars -->
176
    <?php endif; ?>
177

    
178
  </div><!-- /#main -->
179

    
180
  <?php print render($page['footer']); ?>
181

    
182
</div><!-- /#page -->
183

    
184
<?php print render($page['bottom']); ?>
(3-3/3)