PageRenderTime 51ms CodeModel.GetById 26ms RepoModel.GetById 1ms app.codeStats 0ms

/sites/all/themes/titan/page.tpl.php

https://bitbucket.org/hjain/trinet
PHP | 197 lines | 106 code | 25 blank | 66 comment | 30 complexity | 3db9e65d54591f8395769618a3a6482f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-3.0, AGPL-1.0
  1. <?php
  2. // $Id: page.tpl.php,v 1.4 2010/12/29 21:40:22 jarek Exp $
  3. /**
  4. * @file
  5. * Default theme implementation to display a single Drupal page.
  6. *
  7. * Available variables:
  8. *
  9. * General utility variables:
  10. * - $base_path: The base URL path of the Drupal installation. At the very
  11. * least, this will always default to /.
  12. * - $directory: The directory the template is located in, e.g. modules/system
  13. * or themes/garland.
  14. * - $is_front: TRUE if the current page is the front page.
  15. * - $logged_in: TRUE if the user is registered and signed in.
  16. * - $is_admin: TRUE if the user has permission to access administration pages.
  17. *
  18. * Site identity:
  19. * - $front_page: The URL of the front page. Use this instead of $base_path,
  20. * when linking to the front page. This includes the language domain or
  21. * prefix.
  22. * - $logo: The path to the logo image, as defined in theme configuration.
  23. * - $site_name: The name of the site, empty when display has been disabled
  24. * in theme settings.
  25. * - $site_slogan: The slogan of the site, empty when display has been disabled
  26. * in theme settings.
  27. *
  28. * Navigation:
  29. * - $main_menu (array): An array containing the Main menu links for the
  30. * site, if they have been configured.
  31. * - $secondary_menu (array): An array containing the Secondary menu links for
  32. * the site, if they have been configured.
  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. *
  55. * Regions:
  56. * - $page['help']: Dynamic help text, mostly for admin pages.
  57. * - $page['content']: The main content of the current page.
  58. * - $page['sidebar_first']: Items for the first sidebar.
  59. * - $page['sidebar_second']: Items for the second sidebar.
  60. * - $page['header']: Items for the header region.
  61. * - $page['footer']: Items for the footer region.
  62. *
  63. * @see template_preprocess()
  64. * @see template_preprocess_page()
  65. * @see template_process()
  66. */
  67. //echo "<pre>"; print_r($is_front);exit;
  68. ?>
  69. <div id="header-wrapper">
  70. <div id="header">
  71. <div id="branding">
  72. <?php if ($logo): ?>
  73. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo">
  74. <img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" />
  75. </a>
  76. <?php endif; ?>
  77. <?php if ($site_name): ?>
  78. <?php if ($title): ?>
  79. <div id="site-name"><strong>
  80. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
  81. </strong></div>
  82. <?php else: /* Use h1 when the content title is empty */ ?>
  83. <h1 id="site-name">
  84. <a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><?php print $site_name; ?></a>
  85. </h1>
  86. <?php endif; ?>
  87. <?php endif; ?>
  88. <?php if ($site_slogan): ?>
  89. <div id="site-slogan"><?php print $site_slogan; ?></div>
  90. <?php endif; ?>
  91. <div id="header_top">
  92. <?php print render($page['header_top']);?>
  93. </div>
  94. </div> <!-- /#branding -->
  95. </div> <!-- /#header -->
  96. </div> <!-- /#header-wrapper -->
  97. <?php if ($page['header_menu']): ?>
  98. <div id="header-menu-wrapper">
  99. <div id="header-menu">
  100. <?php print render($page['header_menu']); ?>
  101. </div>
  102. </div>
  103. <?php endif; ?>
  104. <div id="main-wrapper">
  105. <div id="main" class="clearfix">
  106. <div id="content">
  107. <div class="inner">
  108. <?php if ($breadcrumb): ?><div id="breadcrumb" class="clearfix"><?php print $breadcrumb; ?></div><?php endif; ?>
  109. <?php if ($messages): ?><div id="messages"><?php print $messages; ?></div><?php endif; ?>
  110. <?php if ($tabs): ?>
  111. <?php if(isset($tabs['#primary']['2'])): ?>
  112. <?php unset($tabs['#primary']['2']); ?>
  113. <?php endif; ?>
  114. <?php if(isset($tabs['#primary']['3'])): ?>
  115. <?php unset($tabs['#primary']['3']); ?>
  116. <?php endif; ?>
  117. <div class="tabs"><?php print render($tabs); ?></div><?php endif; ?>
  118. <?php print render($page['help']); ?>
  119. <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
  120. <a id="main-content"></a>
  121. <?php print render($page['content']); ?>
  122. <?php print $feed_icons; ?>
  123. </div> <!-- /.inner -->
  124. </div> <!-- /#content -->
  125. <?php if ($page['sidebar_first']): ?>
  126. <div id="sidebar">
  127. <div class="inner">
  128. <?php print render($page['sidebar_first']); ?>
  129. </div> <!-- /.inner -->
  130. </div> <!-- /#sidebar -->
  131. <?php endif; ?>
  132. </div> <!-- /#main -->
  133. </div> <!-- /#main-wrapper -->
  134. <div id="footer-wrapper">
  135. <div id="footer">
  136. <h2 class="element-invisible"><?php print t('Footer'); ?></h2>
  137. <?php if ($page['footer_column_first'] || $page['footer_column_second'] || $page['footer_column_third'] || $page['footer_column_fourth']): ?>
  138. <div id="footer-columns" class="clearfix columns-<?php print $footer_columns_number; ?>">
  139. <?php if ($page['footer_column_first']): ?>
  140. <div id="footer-column-first" class="column first">
  141. <?php print render($page['footer_column_first']); ?>
  142. </div> <!-- /#footer-column-first -->
  143. <?php endif; ?>
  144. <?php if ($page['footer_column_second']): ?>
  145. <div id="footer-column-second" class="column <?php if (!$page['footer_column_first']): ?> first<?php endif; ?><?php if (!$page['footer_column_third'] && !$page['footer_column_fourth']): ?> last<?php endif; ?>">
  146. <?php print render($page['footer_column_second']); ?>
  147. </div> <!-- /#footer-column-second -->
  148. <?php endif; ?>
  149. <?php if ($page['footer_column_third']): ?>
  150. <div id="footer-column-third" class="column <?php if (!$page['footer_column_first'] && !$page['footer_column_second']): ?> first<?php endif; ?><?php if (!$page['footer_column_fourth']): ?> last<?php endif; ?>">
  151. <?php print render($page['footer_column_third']); ?>
  152. </div> <!-- /#footer-column-third -->
  153. <?php endif; ?>
  154. <?php if ($page['footer_column_fourth']): ?>
  155. <div id="footer-column-fourth" class="column last <?php if (!$page['footer_column_first'] && !$page['footer_column_second'] && !$page['footer_column_third']): ?> first<?php endif; ?>">
  156. <?php print render($page['footer_column_fourth']); ?>
  157. </div> <!-- /#footer-column-fourth -->
  158. <?php endif; ?>
  159. </div><!-- /#footer-columns -->
  160. <?php endif; ?>
  161. <div id="closure" class="clearfix">
  162. <ul id="info">
  163. <li class="copyright"><?php print theme_get_setting('copyright_information'); ?></li>
  164. </ul>
  165. <?php if ($page['footer_menu']): ?>
  166. <div id="footer-menu">
  167. <?php print render($page['footer_menu']); ?>
  168. </div> <!-- /#footer-menu -->
  169. <?php endif; ?>
  170. </div> <!-- /#closure -->
  171. </div> <!-- /#footer -->
  172. </div> <!-- /#footer-wrapper -->