Projet

Général

Profil

Paste
Télécharger (10,3 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / responsive / templates / page.tpl.php @ 1f623f01

1
<?php
2
/**
3
 * @file
4
 * Default theme 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/garland.
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
 * - $breadcrumb: The breadcrumb trail for the current page.
33
 *
34
 * Page content (in order of occurrence in the default page.tpl.php):
35
 * - $title_prefix (array): An array containing additional output populated by
36
 *   modules, intended to be displayed in front of the main title tag that
37
 *   appears in the template.
38
 * - $title: The page title, for use in the actual HTML content.
39
 * - $title_suffix (array): An array containing additional output populated by
40
 *   modules, intended to be displayed after the main title tag that appears in
41
 *   the template.
42
 * - $messages: HTML for status and error messages. Should be displayed
43
 *   prominently.
44
 * - $tabs (array): Tabs linking to any sub-pages beneath the current page
45
 *   (e.g., the view and edit tabs when displaying a node).
46
 * - $action_links (array): Actions local to the page, such as 'Add menu' on the
47
 *   menu administration interface.
48
 * - $feed_icons: A string of all feed icons for the current page.
49
 * - $node: The node object, if there is an automatically-loaded node
50
 *   associated with the page, and the node ID is the second argument
51
 *   in the page's path (e.g. node/12345 and node/12345/revisions, but not
52
 *   comment/reply/12345).
53
 *
54
 * Regions:
55
 * - $page['help']: Dynamic help text, mostly for admin pages.
56
 * - $page['content']: The main content of the current page.
57
 * - $page['sidebar_first']: Items for the first sidebar.
58
 * - $page['sidebar_second']: Items for the second sidebar.
59
 * - $page['header']: Items for the header region.
60
 * - $page['footer']: Items for the footer region.
61
 *
62
 * @see template_preprocess()
63
 * @see template_preprocess_page()
64
 * @see template_process()
65
 */
66
?>
67

    
68
<div class="container">
69

    
70
  <header id="head" role="banner">
71
    <hgroup class="five columns alpha">
72
       <div id="logo">
73
        <?php if ($logo): ?><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>"/></a><?php endif; ?>
74
        <?php if ($site_slogan): ?><div class="site-slogan"><?php print $site_slogan; ?></div><!--site slogan--><?php endif; ?>
75
       </div>
76
    </hgroup>
77
    
78
    <div class="eleven columns omega" id="headright">
79
      <?php if (theme_get_setting('socialicon_display', 'responsive')): ?>
80
      <?php 
81
      $twitter_url = check_plain(theme_get_setting('twitter_url', 'responsive')); 
82
      $facebook_url = check_plain(theme_get_setting('facebook_url', 'responsive')); 
83
      $googleplus_url = check_plain(theme_get_setting('googleplus_url', 'responsive')); 
84
      $linkedin_url = check_plain(theme_get_setting('linkedin_url', 'responsive')); 
85
      $theme_path_social = base_path() . drupal_get_path('theme', 'responsive');
86
      ?>
87
      <div id="socialbar">
88
        <ul class="social">
89
      <?php if ($twitter_url): ?><li> <a href="<?php print $twitter_url; ?>" target="_blank"> <img src="<?php print $theme_path_social; ?>/images/twitter.png"> </a> </li> <?php endif; ?>
90
      <?php if ($facebook_url): ?><li> <a href="<?php print $facebook_url; ?>" target="_blank"> <img src="<?php print $theme_path_social; ?>/images/facebook.png"> </a> </li> <?php endif; ?>
91
      <?php if ($googleplus_url): ?><li> <a href="<?php print $googleplus_url; ?>" target="_blank"> <img src="<?php print $theme_path_social; ?>/images/gplus.png"> </a> </li> <?php endif; ?>
92
      <?php if ($linkedin_url): ?><li> <a href="<?php print $linkedin_url; ?>" target="_blank"> <img src="<?php print $theme_path_social; ?>/images/in.png"> </a> </li> <?php endif; ?>
93
      <li> <a href="<?php print $front_page; ?>rss.xml"> <img src="<?php print $theme_path_social; ?>/images/rss.png"> </a> </li>
94
        </ul>
95
      </div>
96
      <?php endif; ?>
97
      
98
      <nav id="navigation" role="navigation">
99
      <div id="main-menu">
100
        <?php 
101
          if (module_exists('i18n')) {
102
            $main_menu_tree = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
103
          } else {
104
            $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
105
          }
106
          print drupal_render($main_menu_tree);
107
        ?>
108
       </div>
109
      </nav><!-- end main-menu -->
110
     </div>
111
  </header>
112
</div>
113
  
114
<div class="container" id="content-contain">
115

    
116
  <?php if ($is_front): ?>
117
    <div class="container">
118
    <?php if (theme_get_setting('slideshow_display', 'responsive')): ?>
119
      <!-- Slides -->
120
      <?php 
121
      $url1 = check_plain(theme_get_setting('slide1_url','responsive')); $cap1 = check_markup(theme_get_setting('slide1_desc','responsive'), 'full_html');
122
      $url2 = check_plain(theme_get_setting('slide2_url','responsive')); $cap2 = check_markup(theme_get_setting('slide2_desc','responsive'), 'full_html');
123
      $url3 = check_plain(theme_get_setting('slide3_url','responsive')); $cap3 = check_markup(theme_get_setting('slide3_desc','responsive'), 'full_html');
124
      ?>
125
     <div class="flexslider">
126
      <ul class="slides">
127
        <li>
128
          <a href="<?php print url($url1); ?>"><img src="<?php print base_path() . drupal_get_path('theme', 'responsive') . '/images/slide-image-1.jpg'; ?>"/></a>
129
          <?php if ($cap1): ?> <div class="flex-caption"> <h3> <?php print $cap1; ?> </h3> </div>  <?php endif; ?>
130
        </li>
131
        <li>
132
          <a href="<?php print url($url2); ?>"><img src="<?php print base_path() . drupal_get_path('theme', 'responsive') . '/images/slide-image-2.jpg'; ?>"/></a>
133
          <?php if ($cap2): ?> <div class="flex-caption"> <h3> <?php print $cap2; ?> </h3> </div> <?php endif; ?>
134
        </li>
135
        <li>
136
          <a href="<?php print url($url3); ?>"><img src="<?php print base_path() . drupal_get_path('theme', 'responsive') . '/images/slide-image-3.jpg'; ?>"/></a>
137
          <?php if ($cap3): ?> <div class="flex-caption"> <h3> <?php print $cap3; ?> </h3> </div> <?php endif; ?>
138
        </li>
139
      </ul>
140
      </div>
141
     <?php endif; ?>
142
        
143
      <?php if ($page['front_welcome']): ?>
144
        <div id="front-welcome"> <?php print render($page['front_welcome']); ?></div>
145
      <?php endif; ?>
146
    </div>
147
  <?php endif; ?>
148
  
149
    
150
  
151
  <?php if ($page['header']): ?>
152
   <div id="header" class="sixteen columns">
153
    <?php print render($page['header']); ?>
154
   </div>
155
   <div class="clear"></div>
156
   <?php endif; ?>
157
  
158
 <?php if($page['sidebar_first']) { $contentwid= "eleven"; } else { $contentwid= "sixteen"; } ?>
159
 
160
 <div id="content" class="<?php print $contentwid; ?> columns">
161
  <div id="breadcrumbs"><?php if (theme_get_setting('breadcrumbs', 'responsive')): ?><?php if ($breadcrumb): print $breadcrumb; endif;?><?php endif; ?></div>
162
   <section id="post-content" role="main">
163
    <?php print $messages; ?>
164
    <?php if ($page['content_top']): ?><div id="content_top"><?php print render($page['content_top']); ?></div><?php endif; ?>
165
    <?php print render($title_prefix); ?>
166
    <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?>
167
    <?php print render($title_suffix); ?>
168
    <?php if (!empty($tabs['#primary'])): ?><div class="tabs-wrapper"><?php print render($tabs); ?></div><?php endif; ?>
169
    <?php print render($page['help']); ?>
170
    <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
171
    <?php print render($page['content']); ?>
172
  </section> <!-- /#main -->
173
 </div>
174

    
175
  <?php if ($page['sidebar_first']): ?>
176
    <aside id="sidebar-first" role="complementary" class="sidebar five columns">
177
      <?php print render($page['sidebar_first']); ?>
178
    </aside>  <!-- /#sidebar-first -->
179
  <?php endif; ?>
180

    
181
  <div class="clear"></div>
182
  
183
  <?php if ($page['footer']): ?>
184
   <div id="foot" class="sixteen columns">
185
     <?php print render($page['footer']) ?>
186
   </div>
187
   <?php endif; ?>
188
  
189
</div>
190
 
191
<?php if ($page['footer_first'] || $page['footer_second'] || $page['footer_third'] || $page['footer_fourth']): ?> 
192
  <div id="bottom" class="container">
193
  <?php $botomwid = "four"; $bottom = ((bool) $page['footer_first'] + (bool) $page['footer_second'] + (bool) $page['footer_third'] + (bool) $page['footer_fourth']);
194
    switch ($bottom) { 
195
      case 1: $botomwid = "sixteen"; break; case 2: $botomwid = "eight"; break;
196
      case 3: $botomwid = "five"; break; case 4: $botomwid = "four";
197
    } ?>
198
    <?php if ($page['footer_first']): ?>
199
    <div class="<?php print $botomwid; ?> columns botblck"><?php print render($page['footer_first']); ?></div>
200
    <?php endif; ?>
201
    <?php if ($page['footer_second']): ?>
202
    <div class="<?php print $botomwid; ?> columns botblck"><?php print render($page['footer_second']); ?></div>
203
    <?php endif; ?>
204
    <?php if ($page['footer_third']): ?>
205
    <div class="<?php print $botomwid; ?> columns botblck"><?php print render($page['footer_third']); ?></div>
206
    <?php endif; ?>
207
    <?php if ($page['footer_fourth']): ?>
208
    <div class="<?php print $botomwid; ?> columns botblck"><?php print render($page['footer_fourth']); ?></div>
209
    <?php endif; ?>
210
    </div>
211
<?php endif; ?>
212
  
213
<div id="copyright" class="container">
214
 <div class="credit"><?php print t('Copyright'); ?> &copy; <?php echo date("Y"); ?>, <?php print $site_name; ?> <br/> <?php print t('Developed by'); ?> <a href="http://www.devsaran.com" target="_blank">Devsaran</a>.</div>
215
  <div class="clear"></div>
216
</div>