You are here

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

Theme override for a two column layout.

This template provides a two column display layout with full width areas at the top, bottom and in the middle.

Available variables:

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

File

core/themes/stable9/layouts/layout_discovery/twocol_bricks/layout--twocol-bricks.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for a two column layout.
  5. *
  6. * This template provides a two column display layout with full width areas at
  7. * the top, bottom and in the middle.
  8. *
  9. * Available variables:
  10. * - content: The content for this layout.
  11. * - attributes: HTML attributes for the layout <div>.
  12. */
  13. #}
  14. {%
  15. set classes = [
  16. 'layout',
  17. 'layout--twocol-bricks',
  18. ]
  19. %}
  20. {% if content %}
  21. <div{{ attributes.addClass(classes) }}>
  22. {% if content.top %}
  23. <div {{ region_attributes.top.addClass('layout__region', 'layout__region--top') }}>
  24. {{ content.top }}
  25. </div>
  26. {% endif %}
  27. {% if content.first_above %}
  28. <div {{ region_attributes.first_above.addClass('layout__region', 'layout__region--first-above') }}>
  29. {{ content.first_above }}
  30. </div>
  31. {% endif %}
  32. {% if content.second_above %}
  33. <div {{ region_attributes.second_above.addClass('layout__region', 'layout__region--second-above') }}>
  34. {{ content.second_above }}
  35. </div>
  36. {% endif %}
  37. {% if content.middle %}
  38. <div {{ region_attributes.middle.addClass('layout__region', 'layout__region--middle') }}>
  39. {{ content.middle }}
  40. </div>
  41. {% endif %}
  42. {% if content.first_below %}
  43. <div {{ region_attributes.first_below.addClass('layout__region', 'layout__region--first-below') }}>
  44. {{ content.first_below }}
  45. </div>
  46. {% endif %}
  47. {% if content.second_below %}
  48. <div {{ region_attributes.second_below.addClass('layout__region', 'layout__region--second-below') }}>
  49. {{ content.second_below }}
  50. </div>
  51. {% endif %}
  52. {% if content.bottom %}
  53. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  54. {{ content.bottom }}
  55. </div>
  56. {% endif %}
  57. </div>
  58. {% endif %}