page.tpl.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 id="header-blocks">
  78. <?php print render($page['headerblock_left']); ?>
  79. <?php print render($page['headerblock_middle']); ?>
  80. <?php print render($page['headerblock_right']); ?>
  81. </div>
  82. <?php endif; ?>
  83. <?php if ($breadcrumb): ?>
  84. <section id="breadcrumb"><?php print $breadcrumb; ?></section>
  85. <?php endif; ?>
  86. </header>
  87. <!-- /header -->
  88. <div id="main">
  89. <?php if ($method == 0 || $method == 2): ?>
  90. <?php print render($page['sidebar_first']); ?>
  91. <?php endif; ?>
  92. <?php if ($method == 2): ?>
  93. <?php print render($page['sidebar_second']) ?>
  94. <?php endif; ?>
  95. <?php if(isset($page['sidebar_first']) || isset($page['sidebar_second'])): ?>
  96. <section id="center">
  97. <?php endif; ?>
  98. <?php if ($primary_local_tasks || $secondary_local_tasks || $action_links): ?>
  99. <div id="tasks">
  100. <?php if ($primary_local_tasks): ?>
  101. <ul class="tabs primary"><?php print render($primary_local_tasks); ?></ul>
  102. <?php endif; ?>
  103. <?php if ($secondary_local_tasks): ?>
  104. <ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul>
  105. <?php endif; ?>
  106. <?php if ($action_links = render($action_links)): ?>
  107. <ul class="action-links"><?php print $action_links; ?></ul>
  108. <?php endif; ?>
  109. </div>
  110. <?php endif; ?>
  111. <?php if ($show_messages && $messages): print $messages; endif; ?>
  112. <?php print render($page['help']); ?>
  113. <?php print render($page['content_top']); ?>
  114. <section id="content">
  115. <?php if($title): ?><h1 class="page-title"><?php print $title ?></h1><?php endif; ?>
  116. <?php print render($page['content']); ?>
  117. </section>
  118. <?php print render($page['content_bottom']); ?>
  119. <?php if(isset($page['sidebar_first']) || isset($page['sidebar_second'])): ?>
  120. </section>
  121. <?php endif; ?>
  122. <!-- /center -->
  123. <?php if ($method == 1): ?>
  124. <?php print render($page['sidebar_first']); ?>
  125. <?php endif; ?>
  126. <?php if ($method == 0 || $method == 1): ?>
  127. <?php print render($page['sidebar_second']) ?>
  128. <?php endif; ?>
  129. </div><!-- /main -->
  130. <footer id="footer">
  131. <?php print render($page['footer_top']); ?>
  132. <?php if ($page['footer_left'] || $page['footer_middle_left'] || $page['footer_middle_right'] || $page['footer_right']): ?>
  133. <div class="footer-block">
  134. <?php print render($page['footer_left']); ?>
  135. <?php print render($page['footer_middle-left']); ?>
  136. <?php print render($page['footer_midle-right']); ?>
  137. <?php print render($page['footer_right']); ?>
  138. </div>
  139. <?php endif; ?>
  140. <?php print render($page['footer_bottom']); ?>
  141. </footer>
  142. <!-- /footer -->