Same filename in this branch
  1. 10 core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig
  2. 10 core/themes/stable9/layouts/layout_discovery/twocol_bricks/layout--twocol-bricks.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig
  2. 9 core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig

Default theme implementation 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:

  • in_preview: Whether the plugin is being rendered in preview mode.
  • content: The content for this layout.
  • attributes: HTML attributes for the layout <div>.

File

core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * - in_preview: Whether the plugin is being rendered in preview mode.
  11. * - content: The content for this layout.
  12. * - attributes: HTML attributes for the layout <div>.
  13. *
  14. * @ingroup themeable
  15. */
  16. #}
  17. {%
  18. set classes = [
  19. 'layout',
  20. 'layout--twocol-bricks',
  21. ]
  22. %}
  23. {% if content %}
  24. <div{{ attributes.addClass(classes) }}>
  25. {% if content.top %}
  26. <div {{ region_attributes.top.addClass('layout__region', 'layout__region--top') }}>
  27. {{ content.top }}
  28. </div>
  29. {% endif %}
  30. {% if content.first_above %}
  31. <div {{ region_attributes.first_above.addClass('layout__region', 'layout__region--first-above') }}>
  32. {{ content.first_above }}
  33. </div>
  34. {% endif %}
  35. {% if content.second_above %}
  36. <div {{ region_attributes.second_above.addClass('layout__region', 'layout__region--second-above') }}>
  37. {{ content.second_above }}
  38. </div>
  39. {% endif %}
  40. {% if content.middle %}
  41. <div {{ region_attributes.middle.addClass('layout__region', 'layout__region--middle') }}>
  42. {{ content.middle }}
  43. </div>
  44. {% endif %}
  45. {% if content.first_below %}
  46. <div {{ region_attributes.first_below.addClass('layout__region', 'layout__region--first-below') }}>
  47. {{ content.first_below }}
  48. </div>
  49. {% endif %}
  50. {% if content.second_below %}
  51. <div {{ region_attributes.second_below.addClass('layout__region', 'layout__region--second-below') }}>
  52. {{ content.second_below }}
  53. </div>
  54. {% endif %}
  55. {% if content.bottom %}
  56. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  57. {{ content.bottom }}
  58. </div>
  59. {% endif %}
  60. </div>
  61. {% endif %}

Related topics