layout.html.twig
Same filename in this branch
Same filename in other branches
- 8.9.x core/themes/stable/templates/layout/layout.html.twig
- 8.9.x core/modules/layout_discovery/templates/layout.html.twig
- 10 core/themes/stable9/templates/layout/layout.html.twig
- 10 core/modules/layout_discovery/templates/layout.html.twig
- 11.x core/themes/stable9/templates/layout/layout.html.twig
- 11.x core/modules/layout_discovery/templates/layout.html.twig
Template for a generic layout.
3 theme calls to layout.html.twig
- FieldLayoutBuilderTest::testBuildForm in core/
modules/ field_layout/ tests/ src/ Unit/ FieldLayoutBuilderTest.php - @covers ::buildForm @covers ::getFields
- FieldLayoutBuilderTest::testBuildView in core/
modules/ field_layout/ tests/ src/ Unit/ FieldLayoutBuilderTest.php - @covers ::buildView @covers ::getFields
- LayoutDefaultTest::testBuild in core/
tests/ Drupal/ Tests/ Core/ Layout/ LayoutDefaultTest.php - @covers ::build @dataProvider providerTestBuild
File
-
core/
themes/ stable9/ templates/ layout/ layout.html.twig
View source
- {#
- /**
- * @file
- * Template for a generic layout.
- */
- #}
- {%
- set classes = [
- 'layout',
- 'layout--' ~ layout.id|clean_class,
- ]
- %}
- {% if content %}
- <div{{ attributes.addClass(classes) }}>
- {% for region in layout.getRegionNames %}
- {% if content[region] %}
- <div {{ region_attributes[region].addClass('layout__region', 'layout__region--' ~ region|clean_class) }}>
- {{ content[region] }}
- </div>
- {% endif %}
- {% endfor %}
- </div>
- {% endif %}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.