page.tpl.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. <header id="header">
  69. <hgroup class="logo">
  70. <?php
  71. if ($site_title) {
  72. print $site_title;
  73. }
  74. ?>
  75. </hgroup>
  76. <?php if ($page['headerblock_left'] || $page['headerblock_middle'] || $page['headerblock_right']): ?>
  77. <div class="burger-icon"><span/></div>
  78. <div id="header-blocks">
  79. <?php print render($page['headerblock_left']); ?>
  80. <?php print render($page['headerblock_middle']); ?>
  81. <?php print render($page['headerblock_right']); ?>
  82. </div>
  83. <?php endif; ?>
  84. </header>
  85. <!-- /header -->
  86. <div id="main">
  87. <?php print render($page['sidebar_first']); ?>
  88. <section id="center">
  89. <?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
  90. <div id="tasks">
  91. <?php if ($primary_local_tasks): ?>
  92. <ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul>
  93. <?php endif; ?>
  94. <?php if ($secondary_local_tasks): ?>
  95. <ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul>
  96. <?php endif; ?>
  97. <?php if ($action_links = render($action_links)): ?>
  98. <ul class="action-links"><?php print $action_links; ?></ul>
  99. <?php endif; ?>
  100. </div>
  101. <?php endif; ?>
  102. <?php if ($show_messages && $messages): print $messages; endif; ?>
  103. <?php print render($page['help']); ?>
  104. <?php print render($page['content_top']); ?>
  105. <?php if($title): ?><h1 class="page-title"><?php print $title ?></h1><?php endif; ?>
  106. <?php print render($page['content']); ?>
  107. <?php print render($page['content_bottom']); ?>
  108. </section>
  109. <!-- /center -->
  110. <?php print render($page['sidebar_second']) ?>
  111. </div><!-- /main -->
  112. <footer id="footer">
  113. <?php print render($page['footer_top']); ?>
  114. <?php if ($page['footer_left'] || $page['footer_middle_left'] || $page['footer_middle_right'] || $page['footer_right']): ?>
  115. <div class="footer-blocks">
  116. <?php print render($page['footer_left']); ?>
  117. <?php print render($page['footer_middle-left']); ?>
  118. <?php print render($page['footer_midle-right']); ?>
  119. <?php print render($page['footer_right']); ?>
  120. </div>
  121. <?php endif; ?>
  122. <?php print render($page['footer_bottom']); ?>
  123. </footer>
  124. <!-- /footer -->