layout--twocol-bricks.html.twig

Same filename in this branch
  1. 8.9.x core/themes/stable/templates/layout/layout--twocol-bricks.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/layouts/layout_discovery/twocol_bricks/layout--twocol-bricks.html.twig
  2. 9 core/themes/stable/templates/layout/layout--twocol-bricks.html.twig
  3. 9 core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig
  4. 10 core/themes/stable9/layouts/layout_discovery/twocol_bricks/layout--twocol-bricks.html.twig
  5. 10 core/modules/layout_discovery/layouts/twocol_bricks/layout--twocol-bricks.html.twig
  6. 11.x core/themes/stable9/layouts/layout_discovery/twocol_bricks/layout--twocol-bricks.html.twig
  7. 11.x 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:

  • 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. * - content: The content for this layout.
  11. * - attributes: HTML attributes for the layout <div>.
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {%
  17. set classes = [
  18. 'layout',
  19. 'layout--twocol-bricks',
  20. ]
  21. %}
  22. {% if content %}
  23. <div{{ attributes.addClass(classes) }}>
  24. {% if content.top %}
  25. <div {{ region_attributes.top.addClass('layout__region', 'layout__region--top') }}>
  26. {{ content.top }}
  27. </div>
  28. {% endif %}
  29. {% if content.first_above %}
  30. <div {{ region_attributes.first_above.addClass('layout__region', 'layout__region--first-above') }}>
  31. {{ content.first_above }}
  32. </div>
  33. {% endif %}
  34. {% if content.second_above %}
  35. <div {{ region_attributes.second_above.addClass('layout__region', 'layout__region--second-above') }}>
  36. {{ content.second_above }}
  37. </div>
  38. {% endif %}
  39. {% if content.middle %}
  40. <div {{ region_attributes.middle.addClass('layout__region', 'layout__region--middle') }}>
  41. {{ content.middle }}
  42. </div>
  43. {% endif %}
  44. {% if content.first_below %}
  45. <div {{ region_attributes.first_below.addClass('layout__region', 'layout__region--first-below') }}>
  46. {{ content.first_below }}
  47. </div>
  48. {% endif %}
  49. {% if content.second_below %}
  50. <div {{ region_attributes.second_below.addClass('layout__region', 'layout__region--second-below') }}>
  51. {{ content.second_below }}
  52. </div>
  53. {% endif %}
  54. {% if content.bottom %}
  55. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  56. {{ content.bottom }}
  57. </div>
  58. {% endif %}
  59. </div>
  60. {% endif %}

Related topics


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