PageRenderTime 41ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/sites/dcycleproject.org/themes/dark_elegant/templates/page.tpl.php

https://gitlab.com/leevh/dcyclesite
PHP | 213 lines | 132 code | 17 blank | 64 comment | 35 complexity | 799d5b80be4f01ab009d906d4763249f MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
  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. <div id="page" class="container_6">
  68. <header id="header" role="banner">
  69. <div class="top clearfix">
  70. <hgroup class="site-name-wrap">
  71. <h1 class="site-name"><a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>"><?php print $site_name; ?></a></h1>
  72. <?php if ($site_slogan): ?><h2 class="site-slogan"><?php print $site_slogan; ?></h2><?php endif; ?>
  73. </hgroup>
  74. <div class="search-block-region">
  75. <?php print render ($page['search_block']); ?>
  76. </div>
  77. </div>
  78. <nav id="navigation" role="navigation">
  79. <div id="main-menu">
  80. <?php
  81. if (module_exists('i18n_menu')) {
  82. $main_menu_tree = i18n_menu_translated_tree(variable_get('menu_main_links_source', 'main-menu'));
  83. } else {
  84. $main_menu_tree = menu_tree(variable_get('menu_main_links_source', 'main-menu'));
  85. }
  86. print drupal_render($main_menu_tree);
  87. ?>
  88. </div>
  89. </nav>
  90. </header>
  91. <div id="main" class="clearfix">
  92. <?php if (FALSE): //$is_front): ?>
  93. <?php if (theme_get_setting('slideshow_display','dark_elegant')): ?>
  94. <?php
  95. $slide1_head = check_plain(theme_get_setting('slide1_head','dark_elegant')); $slide1_desc = check_markup(theme_get_setting('slide1_desc','dark_elegant'), 'full_html'); $slide1_url = check_plain(theme_get_setting('slide1_url','dark_elegant'));
  96. $slide2_head = check_plain(theme_get_setting('slide2_head','dark_elegant')); $slide2_desc = check_markup(theme_get_setting('slide2_desc','dark_elegant'), 'full_html'); $slide2_url = check_plain(theme_get_setting('slide2_url','dark_elegant'));
  97. $slide3_head = check_plain(theme_get_setting('slide3_head','dark_elegant')); $slide3_desc = check_markup(theme_get_setting('slide3_desc','dark_elegant'), 'full_html'); $slide3_url = check_plain(theme_get_setting('slide3_url','dark_elegant'));
  98. $intro_text = check_markup(theme_get_setting('intro_text', 'dark_elegant'), 'full_html');
  99. ?>
  100. <div id="slider">
  101. <div class="flexslider">
  102. <ul class="slides">
  103. <li><a href="<?php print url($slide1_url); ?>"><img class="slide-image" src="<?php print base_path() . drupal_get_path('theme', 'dark_elegant') . '/images/slide-image-1.jpg'; ?>"/></a>
  104. <div class="flex-caption">
  105. <h3><?php print $slide1_head; ?></h3><?php print $slide1_desc; ?>
  106. </div>
  107. </li>
  108. <li><a href="<?php print url($slide2_url); ?>"><img class="slide-image" src="<?php print base_path() . drupal_get_path('theme', 'dark_elegant') . '/images/slide-image-2.jpg'; ?>"/></a>
  109. <div class="flex-caption">
  110. <h3><?php print $slide2_head; ?></h3><?php print $slide2_desc; ?>
  111. </div>
  112. </li>
  113. <li><a href="<?php print url($slide3_url); ?>"><img class="slide-image" src="<?php print base_path() . drupal_get_path('theme', 'dark_elegant') . '/images/slide-image-3.jpg'; ?>"/></a>
  114. <div class="flex-caption">
  115. <h3><?php print $slide3_head; ?></h3><?php print $slide3_desc; ?>
  116. </div>
  117. </li>
  118. </ul>
  119. </div>
  120. </div>
  121. <?php if ($intro_text) {
  122. print '<div class="intro"><div class="intro-text">' . $intro_text . '</div></div>';
  123. } ?>
  124. <?php endif; ?>
  125. <?php endif; ?>
  126. <?php if($page['preface_first'] || $page['preface_middle'] || $page['preface_last']) : ?>
  127. <?php $preface_grid = "grid_2";
  128. $preface_count = (bool) $page['preface_first'] + (bool) $page['preface_middle'] + (bool) $page['preface_last'];
  129. if ($preface_count == 3) { $preface_grid = "grid_2"; } elseif ($preface_count == 2) { $preface_grid = "grid_3"; } elseif ($preface_count == 1) { $preface_grid = "grid_1"; }?>
  130. <div id="preface-block-wrap" class="container_6 clearfix">
  131. <?php if($page['preface_first']): ?><div class="preface-block <?php print $preface_grid; ?>">
  132. <?php print render ($page['preface_first']); ?>
  133. </div><?php endif; ?>
  134. <?php if($page['preface_middle']): ?><div class="preface-block <?php print $preface_grid; ?>">
  135. <?php print render ($page['preface_middle']); ?>
  136. </div><?php endif; ?>
  137. <?php if($page['preface_last']): ?><div class="preface-block <?php print $preface_grid; ?>">
  138. <?php print render ($page['preface_last']); ?>
  139. </div><?php endif; ?>
  140. </div>
  141. <?php endif; ?>
  142. <?php if ($page['header']): ?>
  143. <div id="header-block" class="clearfix">
  144. <?php print render($page['header']); ?>
  145. </div>
  146. <?php endif; ?>
  147. <div id="primary">
  148. <section id="content" class="grid_4" role="main">
  149. <?php if (theme_get_setting('breadcrumbs')): ?><?php if ($breadcrumb): ?><div id="breadcrumbs"><?php print $breadcrumb; ?></div><?php endif;?><?php endif; ?>
  150. <?php print $messages; ?>
  151. <?php if ($page['content_top']): ?><div id="content_top"><?php print render($page['content_top']); ?></div><?php endif; ?>
  152. <div id="content-wrap">
  153. <?php print render($title_prefix); ?>
  154. <?php if ($title): ?><h1 class="page-title"><?php print $title; ?></h1><?php endif; ?>
  155. <?php print render($title_suffix); ?>
  156. <?php if (!empty($tabs['#primary'])): ?><div class="tabs-wrapper clearfix"><?php print render($tabs); ?></div><?php endif; ?>
  157. <?php print render($page['help']); ?>
  158. <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
  159. <?php print render($page['content']); ?>
  160. </div>
  161. </section> <!-- /#main -->
  162. </div>
  163. <?php if ($page['sidebar_first']): ?>
  164. <aside id="sidebar" class="grid_2" role="complementary">
  165. <?php print render($page['sidebar_first']); ?>
  166. </aside>
  167. <?php endif; ?>
  168. <?php if ($page['footer']): ?>
  169. <div class="clear"></div>
  170. <div id="footer-block" class="clearfix">
  171. <?php print render($page['footer']); ?>
  172. </div>
  173. <?php endif; ?>
  174. </div>
  175. <?php if($page['footer_first'] || $page['footer_second'] || $page['footer_third']) : ?>
  176. <?php $footer_grid = "grid_2";
  177. $footer_count = (bool) $page['footer_first'] + (bool) $page['footer_second'] + (bool) $page['footer_third'];
  178. if ($footer_count == 3) { $footer_grid = "grid_2"; } elseif ($footer_count == 2) { $footer_grid = "grid_3"; } elseif ($footer_count == 1) { $footer_grid = "grid_1"; }?>
  179. <div id="bottom" class="container_6 clearfix">
  180. <?php if($page['footer_first']): ?><div class="bottom-block <?php print $footer_grid; ?>">
  181. <?php print render ($page['footer_first']); ?>
  182. </div><?php endif; ?>
  183. <?php if($page['footer_second']): ?><div class="bottom-block <?php print $footer_grid; ?>">
  184. <?php print render ($page['footer_second']); ?>
  185. </div><?php endif; ?>
  186. <?php if($page['footer_third']): ?><div class="bottom-block <?php print $footer_grid; ?>">
  187. <?php print render ($page['footer_third']); ?>
  188. </div><?php endif; ?>
  189. </div>
  190. <?php endif; ?>
  191. <footer class="site-footer" role="contentinfo">
  192. <div class="copyright">
  193. <?php print t('Copyright'); ?> &copy; <?php echo date("Y"); ?>, <a href="<?php print $front_page; ?>"><?php print $site_name; ?></a><br/>
  194. </div>
  195. </footer>
  196. </div>