You are here

page.html.twig in Zircon Profile 8.0

Bartik's theme implementation to display a single page.

The doctype, html, head and body tags are not in this template. Instead they can be found in the html.html.twig template normally located in the core/modules/system directory.

Available variables:

General utility variables:

  • base_path: The base URL path of the Drupal installation. Will usually be "/" unless you have installed Drupal in a sub-directory.
  • is_front: A flag indicating if the current page is the front page.
  • logged_in: A flag indicating if the user is registered and signed in.
  • is_admin: A flag indicating if the user has permission to access administration pages.

Site identity:

  • front_page: The URL of the front page. Use this instead of base_path when linking to the front page. This includes the language domain or prefix.
  • logo: The url of the logo image, as defined in theme settings.
  • site_name: The name of the site. This is empty when displaying the site name has been disabled in the theme settings.
  • site_slogan: The slogan of the site. This is empty when displaying the site slogan has been disabled in theme settings.

Page content (in order of occurrence in the default page.html.twig):

  • node: Fully loaded node, if there is an automatically-loaded node associated with the page and the node ID is the second argument in the page's path (e.g. node/12345 and node/12345/revisions, but not comment/reply/12345).

Regions:

  • page.header: Items for the header region.
  • page.highlighted: Items for the highlighted region.
  • page.primary_menu: Items for the primary menu region.
  • page.secondary_menu: Items for the secondary menu region.
  • page.featured_top: Items for the featured top region.
  • page.content: The main content of the current page.
  • page.sidebar_first: Items for the first sidebar.
  • page.sidebar_second: Items for the second sidebar.
  • page.featured_bottom_first: Items for the first featured bottom region.
  • page.featured_bottom_second: Items for the second featured bottom region.
  • page.featured_bottom_third: Items for the third featured bottom region.
  • page.footer_first: Items for the first footer column.
  • page.footer_second: Items for the second footer column.
  • page.footer_third: Items for the third footer column.
  • page.footer_fourth: Items for the fourth footer column.
  • page.footer_fifth: Items for the fifth footer column.
  • page.breadcrumb: Items for the breadcrumb region.

See also

template_preprocess_page()

bartik_preprocess_page()

html.html.twig

File

core/themes/bartik/templates/page.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Bartik's theme implementation to display a single page.
  5. *
  6. * The doctype, html, head and body tags are not in this template. Instead they
  7. * can be found in the html.html.twig template normally located in the
  8. * core/modules/system directory.
  9. *
  10. * Available variables:
  11. *
  12. * General utility variables:
  13. * - base_path: The base URL path of the Drupal installation. Will usually be
  14. * "/" unless you have installed Drupal in a sub-directory.
  15. * - is_front: A flag indicating if the current page is the front page.
  16. * - logged_in: A flag indicating if the user is registered and signed in.
  17. * - is_admin: A flag indicating if the user has permission to access
  18. * administration pages.
  19. *
  20. * Site identity:
  21. * - front_page: The URL of the front page. Use this instead of base_path when
  22. * linking to the front page. This includes the language domain or prefix.
  23. * - logo: The url of the logo image, as defined in theme settings.
  24. * - site_name: The name of the site. This is empty when displaying the site
  25. * name has been disabled in the theme settings.
  26. * - site_slogan: The slogan of the site. This is empty when displaying the site
  27. * slogan has been disabled in theme settings.
  28. * Page content (in order of occurrence in the default page.html.twig):
  29. * - node: Fully loaded node, if there is an automatically-loaded node
  30. * associated with the page and the node ID is the second argument in the
  31. * page's path (e.g. node/12345 and node/12345/revisions, but not
  32. * comment/reply/12345).
  33. *
  34. * Regions:
  35. * - page.header: Items for the header region.
  36. * - page.highlighted: Items for the highlighted region.
  37. * - page.primary_menu: Items for the primary menu region.
  38. * - page.secondary_menu: Items for the secondary menu region.
  39. * - page.featured_top: Items for the featured top region.
  40. * - page.content: The main content of the current page.
  41. * - page.sidebar_first: Items for the first sidebar.
  42. * - page.sidebar_second: Items for the second sidebar.
  43. * - page.featured_bottom_first: Items for the first featured bottom region.
  44. * - page.featured_bottom_second: Items for the second featured bottom region.
  45. * - page.featured_bottom_third: Items for the third featured bottom region.
  46. * - page.footer_first: Items for the first footer column.
  47. * - page.footer_second: Items for the second footer column.
  48. * - page.footer_third: Items for the third footer column.
  49. * - page.footer_fourth: Items for the fourth footer column.
  50. * - page.footer_fifth: Items for the fifth footer column.
  51. * - page.breadcrumb: Items for the breadcrumb region.
  52. *
  53. * @see template_preprocess_page()
  54. * @see bartik_preprocess_page()
  55. * @see html.html.twig
  56. */
  57. #}
  58. <div id="page-wrapper">
  59. <div id="page">
  60. <header id="header" class="header" role="banner" aria-label="{{ 'Site header'|t}}">
  61. <div class="section layout-container clearfix">
  62. {{ page.secondary_menu }}
  63. {{ page.header }}
  64. {{ page.primary_menu }}
  65. </div>
  66. </header>
  67. {% if page.highlighted %}
  68. <div class="highlighted">
  69. <aside class="layout-container section clearfix" role="complementary">
  70. {{ page.highlighted }}
  71. </aside>
  72. </div>
  73. {% endif %}
  74. {% if page.featured_top %}
  75. <div class="featured-top">
  76. <aside class="featured-top__inner section layout-container clearfix" role="complementary">
  77. {{ page.featured_top }}
  78. </aside>
  79. </div>
  80. {% endif %}
  81. <div id="main-wrapper" class="layout-main-wrapper layout-container clearfix">
  82. <div id="main" class="layout-main clearfix">
  83. {{ page.breadcrumb }}
  84. <main id="content" class="column main-content" role="main">
  85. <section class="section">
  86. <a id="main-content" tabindex="-1"></a>
  87. {{ page.content }}
  88. </section>
  89. </main>
  90. {% if page.sidebar_first %}
  91. <div id="sidebar-first" class="column sidebar">
  92. <aside class="section" role="complementary">
  93. {{ page.sidebar_first }}
  94. </aside>
  95. </div>
  96. {% endif %}
  97. {% if page.sidebar_second %}
  98. <div id="sidebar-second" class="column sidebar">
  99. <aside class="section" role="complementary">
  100. {{ page.sidebar_second }}
  101. </aside>
  102. </div>
  103. {% endif %}
  104. </div>
  105. </div>
  106. {% if page.featured_bottom_first or page.featured_bottom_second or page.featured_bottom_third %}
  107. <div class="featured-bottom">
  108. <aside class="layout-container clearfix" role="complementary">
  109. {{ page.featured_bottom_first }}
  110. {{ page.featured_bottom_second }}
  111. {{ page.featured_bottom_third }}
  112. </aside>
  113. </div>
  114. {% endif %}
  115. <footer class="site-footer">
  116. <div class="layout-container">
  117. {% if page.footer_first or page.footer_second or page.footer_third or page.footer_fourth %}
  118. <div class="site-footer__top clearfix">
  119. {{ page.footer_first }}
  120. {{ page.footer_second }}
  121. {{ page.footer_third }}
  122. {{ page.footer_fourth }}
  123. </div>
  124. {% endif %}
  125. {% if page.footer_fifth %}
  126. <div class="site-footer__bottom">
  127. {{ page.footer_fifth }}
  128. </div>
  129. {% endif %}
  130. </div>
  131. </footer>
  132. </div>
  133. </div>