page.tpl.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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/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. * - $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['highlighted']: Items for the highlighted content region.
  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. ?>
  68. <?php if($page["off_canvas_menu"]): ?>
  69. <nav class="pushy pushy-left">
  70. <?php print render($page["off_canvas_menu"]); ?>
  71. </nav>
  72. <?php endif; ?>
  73. <!-- Site Overlay for pushy -->
  74. <div class="site-overlay"></div>
  75. <header
  76. id="header"
  77. class="row push">
  78. <?php if($page["off_canvas_menu"]): ?>
  79. <!-- Menu Button -->
  80. <div id="pushy-btn" class="menu-btn"><span class="menu-icon">&nbsp;</span></div>
  81. <?php endif; ?>
  82. <?php print $site_title;?>
  83. <?php print render($page['header']); ?>
  84. </header>
  85. <!-- /header -->
  86. <?php if($page['top']): ?>
  87. <div id="top" class="row">
  88. <div class="columns large-12">
  89. <?php print render($page['top']); ?>
  90. </div>
  91. </div>
  92. <?php endif; ?>
  93. <!-- // top -->
  94. <div id="center" class="row push">
  95. <div id="leftsidebar" class="columns large-3">
  96. <?php print render($page['sidebar_first']); ?>
  97. </div>
  98. <main id="main" class="columns large-9">
  99. <?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
  100. <div id="tasks">
  101. <?php if ($primary_local_tasks): ?>
  102. <ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul>
  103. <?php endif; ?>
  104. <?php if ($secondary_local_tasks): ?>
  105. <ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul>
  106. <?php endif; ?>
  107. <?php if ($action_links = render($action_links)): ?>
  108. <ul class="action-links"><?php print $action_links; ?></ul>
  109. <?php endif; ?>
  110. </div>
  111. <?php endif; ?>
  112. <?php if ($show_messages && $messages): print $messages; endif; ?>
  113. <?php print render($page['help']); ?>
  114. <div class="row">
  115. <section id="content" class="columns large-9" >
  116. <?php print render($page['content_top']); ?>
  117. <?php if($title): ?><h2 class="page-title"><?php print $title ?></h2><?php endif; ?>
  118. <?php print render($page['content']); ?>
  119. <?php print render($page['content_bottom']); ?>
  120. </section>
  121. <section
  122. id="rightsidebar" class="columns large-3">
  123. <?php print render($page['sidebar_second']) ?>
  124. </section>
  125. </div>
  126. </main><!-- /main -->
  127. </div><!-- /center -->
  128. <footer id="footer" class="push">
  129. <div class="row">
  130. <?php print render($page['footer']); ?>
  131. </div>
  132. </footer><!-- /footer -->