layout--onecol.html.twig

Same filename in this branch
  1. 8.9.x core/themes/stable/templates/layout/layout--onecol.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
  2. 9 core/themes/stable/templates/layout/layout--onecol.html.twig
  3. 9 core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
  4. 10 core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
  5. 10 core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
  6. 11.x core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
  7. 11.x core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig

Default theme implementation to display a one-column layout.

Available variables:

  • content: The content for this layout.
  • attributes: HTML attributes for the layout <div>.

File

core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a one-column layout.
  5. *
  6. * Available variables:
  7. * - content: The content for this layout.
  8. * - attributes: HTML attributes for the layout <div>.
  9. *
  10. * @ingroup themeable
  11. */
  12. #}
  13. {%
  14. set classes = [
  15. 'layout',
  16. 'layout--onecol',
  17. ]
  18. %}
  19. {% if content %}
  20. <div{{ attributes.addClass(classes) }}>
  21. <div {{ region_attributes.content.addClass('layout__region', 'layout__region--content') }}>
  22. {{ content.content }}
  23. </div>
  24. </div>
  25. {% endif %}

Related topics


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.