Same filename in this branch
  1. 10 core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
  2. 10 core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
  2. 9 core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig

Default theme implementation to display a one-column layout.

Available variables:

  • in_preview: Whether the plugin is being rendered in preview mode.
  • 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. * - in_preview: Whether the plugin is being rendered in preview mode.
  8. * - content: The content for this layout.
  9. * - attributes: HTML attributes for the layout <div>.
  10. *
  11. * @ingroup themeable
  12. */
  13. #}
  14. {%
  15. set classes = [
  16. 'layout',
  17. 'layout--onecol',
  18. ]
  19. %}
  20. {% if content %}
  21. <div{{ attributes.addClass(classes) }}>
  22. <div {{ region_attributes.content.addClass('layout__region', 'layout__region--content') }}>
  23. {{ content.content }}
  24. </div>
  25. </div>
  26. {% endif %}

Related topics