page.tpl.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. <div class="inner">
  70. <hgroup class="logo"> <?php if ($site_title) { print $site_title; }?> </hgroup>
  71. <?php if ($page['headerblock_left'] || $page['headerblock_middle'] || $page['headerblock_right']): ?>
  72. <div id="header-blocks">
  73. <?php print render($page['headerblock_left']); ?>
  74. <?php print render($page['headerblock_middle']); ?>
  75. <?php print render($page['headerblock_right']); ?>
  76. </div>
  77. <?php endif; ?>
  78. <?php if ($breadcrumb): ?>
  79. <section id="breadcrumb"><?php print $breadcrumb; ?></section>
  80. <?php endif; ?>
  81. </div>
  82. </header><!-- /header -->
  83. <?php if ($page['content_top'] || $page['highlighted'] || $page['tool_bar'] || $primary_local_tasks || $secondary_local_tasks || $action_links): ?>
  84. <div id="utilities">
  85. <div class="inner">
  86. <?php print render($page['highlighted']); ?>
  87. <?php print render($page['content_top']); ?>
  88. <?php print render($page['tool_bar']); ?>
  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. </div>
  103. </div><!-- /utilities -->
  104. <?php endif; ?>
  105. <div id="main">
  106. <?php //print render($page['sidebar_first']); ?>
  107. <section id="center">
  108. <?php if ($show_messages && $messages): print $messages; endif; ?>
  109. <?php print render($page['help']); ?>
  110. <?php if($title): ?><h1 class="page-title"><?php print $title ?></h1><?php endif; ?>
  111. <?php print render($page['content']); ?>
  112. <?php print render($page['content_bottom']); ?>
  113. </section><!-- /center -->
  114. <?php //print render($page['sidebar_second']) ?>
  115. </div><!-- /main -->
  116. <footer id="footer">
  117. <?php print render($page['footer_top']); ?>
  118. <?php if ($page['footer_left'] || $page['footer_middle_left'] || $page['footer_middle_right'] || $page['footer_right']): ?>
  119. <div class="footer-blocks">
  120. <?php print render($page['footer_left']); ?>
  121. <?php print render($page['footer_middle-left']); ?>
  122. <?php print render($page['footer_midle-right']); ?>
  123. <?php print render($page['footer_right']); ?>
  124. </div>
  125. <?php endif; ?>
  126. <?php print render($page['footer_bottom']); ?>
  127. </footer><!-- /footer -->