layout.html.twig in Drupal 9
Same filename in this branch
Same filename and directory in other branches
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/stable/templates/layout/layout.html.twigView 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 %}