layout--onecol.html.twig
Same filename in this branch
Same filename in other branches
- 9 core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
- 9 core/themes/stable/templates/layout/layout--onecol.html.twig
- 9 core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
- 8.9.x core/themes/stable/templates/layout/layout--onecol.html.twig
- 8.9.x core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
- 11.x core/themes/stable9/layouts/layout_discovery/onecol/layout--onecol.html.twig
- 11.x core/modules/layout_discovery/layouts/onecol/layout--onecol.html.twig
Theme override 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/
themes/ stable9/ layouts/ layout_discovery/ onecol/ layout--onecol.html.twig
View source
- {#
- /**
- * @file
- * Theme override 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>.
- */
- #}
- {%
- set classes = [
- 'layout',
- 'layout--onecol',
- ]
- %}
- {% if content %}
- <div{{ attributes.addClass(classes) }}>
- <div {{ region_attributes.content.addClass('layout__region', 'layout__region--content') }}>
- {{ content.content }}
- </div>
- </div>
- {% endif %}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.