layout--threecol-25-50-25.html.twig

Same filename in this branch
  1. 8.9.x core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/layouts/layout_discovery/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  2. 9 core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig
  3. 9 core/modules/layout_discovery/layouts/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  4. 10 core/themes/stable9/layouts/layout_discovery/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  5. 10 core/modules/layout_discovery/layouts/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  6. 11.x core/themes/stable9/layouts/layout_discovery/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  7. 11.x core/modules/layout_discovery/layouts/threecol_25_50_25/layout--threecol-25-50-25.html.twig

Default theme implementation for a three column layout.

This template provides a three column 25%-50%-25% display layout, with additional areas for the top and the bottom.

Available variables:

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

File

core/modules/layout_discovery/layouts/threecol_25_50_25/layout--threecol-25-50-25.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a three column layout.
  5. *
  6. * This template provides a three column 25%-50%-25% display layout, with
  7. * additional areas for the top and the bottom.
  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--threecol-25-50-25',
  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 %}
  30. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  31. {{ content.first }}
  32. </div>
  33. {% endif %}
  34. {% if content.second %}
  35. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  36. {{ content.second }}
  37. </div>
  38. {% endif %}
  39. {% if content.third %}
  40. <div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  41. {{ content.third }}
  42. </div>
  43. {% endif %}
  44. {% if content.bottom %}
  45. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  46. {{ content.bottom }}
  47. </div>
  48. {% endif %}
  49. </div>
  50. {% endif %}

Related topics


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