page.tpl.php 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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
  69. id="header"
  70. class="">
  71. <?php print $site_title;?>
  72. <?php print $site_slogan;?>
  73. <?php //print render($page['header']); ?>
  74. </header>
  75. <!-- /header -->
  76. <?php if($page['top']): ?>
  77. <div id="top" class="row">
  78. <div class="columns large-12">
  79. <?php print render($page['top']); ?>
  80. </div>
  81. </div>
  82. <?php endif; ?>
  83. <!-- // top -->
  84. <?php if($page['sidebar_first']): ?>
  85. <div id="leftsidebar" class="">
  86. <?php print render($page['sidebar_first']); ?>
  87. </div>
  88. <?php endif; ?>
  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. <main id="main" class="">
  105. <?php print render($page['content_top']); ?>
  106. <?php if($title): ?><h2 class="page-title"><?php print $title ?></h2><?php endif; ?>
  107. <?php print render($page['content']); ?>
  108. <?php print render($page['content_bottom']); ?>
  109. </main><!-- /main -->
  110. <?php if($page['sidebar_second']): ?>
  111. <section
  112. id="rightsidebar" class="columns large-3">
  113. <?php print render($page['sidebar_second']) ?>
  114. </section>
  115. <?php endif; ?>
  116. <footer id="footer" class="push">
  117. <div class="row">
  118. <?php print render($page['footer']); ?>
  119. </div>
  120. </footer><!-- /footer -->