You are here

layout.html.twig in Drupal 10

Template for a generic layout.

File

core/modules/layout_discovery/templates/layout.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Template for a generic layout.
  5. */
  6. #}
  7. {%
  8. set classes = [
  9. 'layout',
  10. 'layout--' ~ layout.id|clean_class,
  11. ]
  12. %}
  13. {% if content %}
  14. <div{{ attributes.addClass(classes) }}>
  15. {% for region in layout.getRegionNames %}
  16. {% if content[region] %}
  17. <div {{ region_attributes[region].addClass('layout__region', 'layout__region--' ~ region|clean_class) }}>
  18. {{ content[region] }}
  19. </div>
  20. {% endif %}
  21. {% endfor %}
  22. </div>
  23. {% endif %}