You are here

layout--twocol-section.html.twig in Drupal 10

Default theme implementation to display a two-column layout.

Available variables:

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

File

core/modules/layout_builder/layouts/twocol_section/layout--twocol-section.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a two-column 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. {% if content %}
  14. <div{{ attributes }}>
  15. {% if content.first %}
  16. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  17. {{ content.first }}
  18. </div>
  19. {% endif %}
  20. {% if content.second %}
  21. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  22. {{ content.second }}
  23. </div>
  24. {% endif %}
  25. </div>
  26. {% endif %}

Related topics