layout--fourcol-section.html.twig

Same filename in this branch
  1. 8.9.x core/themes/stable/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

Default theme implementation 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/modules/layout_builder/layouts/fourcol_section/layout--fourcol-section.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  11. */
  12. #}
  13. {%
  14. set classes = [
  15. 'layout',
  16. 'layout--fourcol-section',
  17. ]
  18. %}
  19. {% if content %}
  20. <div{{ attributes.addClass(classes) }}>
  21. {% if content.first %}
  22. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  23. {{ content.first }}
  24. </div>
  25. {% endif %}
  26. {% if content.second %}
  27. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  28. {{ content.second }}
  29. </div>
  30. {% endif %}
  31. {% if content.third %}
  32. <div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  33. {{ content.third }}
  34. </div>
  35. {% endif %}
  36. {% if content.fourth %}
  37. <div {{ region_attributes.fourth.addClass('layout__region', 'layout__region--fourth') }}>
  38. {{ content.fourth }}
  39. </div>
  40. {% endif %}
  41. </div>
  42. {% endif %}

Related topics


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