layout--fourcol-section.html.twig

Same filename in this branch
  1. 8.9.x core/modules/layout_builder/layouts/fourcol_section/layout--fourcol-section.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/layouts/layout_builder/fourcol_section/layout--fourcol-section.html.twig
  2. 9 core/themes/stable/layouts/fourcol_section/layout--fourcol-section.html.twig
  3. 9 core/modules/layout_builder/layouts/fourcol_section/layout--fourcol-section.html.twig
  4. 10 core/themes/stable9/layouts/layout_builder/fourcol_section/layout--fourcol-section.html.twig
  5. 10 core/modules/layout_builder/layouts/fourcol_section/layout--fourcol-section.html.twig
  6. 11.x core/themes/stable9/layouts/layout_builder/fourcol_section/layout--fourcol-section.html.twig
  7. 11.x core/modules/layout_builder/layouts/fourcol_section/layout--fourcol-section.html.twig

Theme override for a four-column 25%-25%-25%-25% layout.

Available variables:

  • content: The content for this layout.
  • attributes: HTML attributes for the layout <div>.

File

core/themes/stable/layouts/fourcol_section/layout--fourcol-section.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a four-column 25%-25%-25%-25% layout.
  5. *
  6. * Available variables:
  7. * - content: The content for this layout.
  8. * - attributes: HTML attributes for the layout <div>.
  9. */
  10. #}
  11. {%
  12. set classes = [
  13. 'layout',
  14. 'layout--fourcol-section',
  15. ]
  16. %}
  17. {% if content %}
  18. <div{{ attributes.addClass(classes) }}>
  19. {% if content.first %}
  20. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  21. {{ content.first }}
  22. </div>
  23. {% endif %}
  24. {% if content.second %}
  25. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  26. {{ content.second }}
  27. </div>
  28. {% endif %}
  29. {% if content.third %}
  30. <div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  31. {{ content.third }}
  32. </div>
  33. {% endif %}
  34. {% if content.fourth %}
  35. <div {{ region_attributes.fourth.addClass('layout__region', 'layout__region--fourth') }}>
  36. {{ content.fourth }}
  37. </div>
  38. {% endif %}
  39. </div>
  40. {% endif %}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.