layout--twocol.html.twig 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. {%
  14. set classes = [
  15. 'layout',
  16. 'layout--twocol',
  17. ]
  18. %}
  19. {% if content %}
  20. <div{{ attributes.addClass(classes) }}>
  21. {% if content.top %}
  22. <div {{ region_attributes.top.addClass('layout__region', 'layout__region--top') }}>
  23. {{ content.top }}
  24. </div>
  25. {% endif %}
  26. {% if content.first %}
  27. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  28. {{ content.first }}
  29. </div>
  30. {% endif %}
  31. {% if content.second %}
  32. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  33. {{ content.second }}
  34. </div>
  35. {% endif %}
  36. {% if content.bottom %}
  37. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  38. {{ content.bottom }}
  39. </div>
  40. {% endif %}
  41. </div>
  42. {% endif %}