1. 8.2.x core/themes/stable/templates/layout/html.html.twig
  2. 8.2.x core/modules/system/templates/html.html.twig
  3. 8.2.x core/themes/classy/templates/layout/html.html.twig
  4. 8.0.x core/modules/system/templates/html.html.twig
  5. 8.0.x core/themes/classy/templates/layout/html.html.twig
  6. 8.0.x core/themes/stable/templates/layout/html.html.twig
  7. 8.1.x core/themes/classy/templates/layout/html.html.twig
  8. 8.1.x core/themes/stable/templates/layout/html.html.twig
  9. 8.1.x core/modules/system/templates/html.html.twig
  10. 8.3.x core/themes/stable/templates/layout/html.html.twig
  11. 8.3.x core/modules/system/templates/html.html.twig
  12. 8.3.x core/themes/classy/templates/layout/html.html.twig

Default theme implementation for the basic structure of a single Drupal page.

Variables:

  • logged_in: A flag indicating if user is logged in.
  • root_path: The root path of the current page (e.g., node, admin, user).
  • node_type: The content type for the current node, if the page is a node.
  • head_title: List of text elements that make up the head_title variable. May contain one or more of the following:

    • title: The title of the page.
    • name: The name of the site.
    • slogan: The slogan of the site.
  • page_top: Initial rendered markup. This should be printed before 'page'.
  • page: The rendered page markup.
  • page_bottom: Closing rendered markup. This variable should be printed after 'page'.
  • db_offline: A flag indicating if the database is offline.
  • placeholder_token: The token for generating head, css, js and js-bottom placeholders.

See also

template_preprocess_html()

1 theme call to html.html.twig
Html::getInfo in core/lib/Drupal/Core/Render/Element/Html.php

File

core/modules/system/templates/html.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the basic structure of a single Drupal page.
  5. *
  6. * Variables:
  7. * - logged_in: A flag indicating if user is logged in.
  8. * - root_path: The root path of the current page (e.g., node, admin, user).
  9. * - node_type: The content type for the current node, if the page is a node.
  10. * - head_title: List of text elements that make up the head_title variable.
  11. * May contain one or more of the following:
  12. * - title: The title of the page.
  13. * - name: The name of the site.
  14. * - slogan: The slogan of the site.
  15. * - page_top: Initial rendered markup. This should be printed before 'page'.
  16. * - page: The rendered page markup.
  17. * - page_bottom: Closing rendered markup. This variable should be printed after
  18. * 'page'.
  19. * - db_offline: A flag indicating if the database is offline.
  20. * - placeholder_token: The token for generating head, css, js and js-bottom
  21. * placeholders.
  22. *
  23. * @see template_preprocess_html()
  24. *
  25. * @ingroup themeable
  26. */
  27. #}
  28. <!DOCTYPE html>
  29. <html{{ html_attributes }}>
  30. <head>
  31. <head-placeholder token="{{ placeholder_token }}">
  32. <title>{{ head_title|safe_join(' | ') }}</title>
  33. <css-placeholder token="{{ placeholder_token }}">
  34. <js-placeholder token="{{ placeholder_token }}">
  35. </head>
  36. <body{{ attributes }}>
  37. {#
  38. Keyboard navigation/accessibility link to main content section in
  39. page.html.twig.
  40. #}
  41. <a href="#main-content" class="visually-hidden focusable">
  42. {{ 'Skip to main content'|t }}
  43. </a>
  44. {{ page_top }}
  45. {{ page }}
  46. {{ page_bottom }}
  47. <js-bottom-placeholder token="{{ placeholder_token }}">
  48. </body>
  49. </html>

Related topics

Comments

JJmonterey’s picture

Is there any difference between the 8.0.x, 8.1.z, and 8.2.x for the following:

core/themes/classy/templates/layout/html.html.twig
core/modules/system/templates/html.html.twig
core/themes/stable/templates/layout/html.html.twig