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

Same filename in this branch
  1. 10 core/modules/layout_discovery/layouts/threecol_25_50_25/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. 8.9.x core/themes/stable/templates/layout/layout--threecol-25-50-25.html.twig
  5. 8.9.x 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

Theme override 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:

  • 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/themes/stable9/layouts/layout_discovery/threecol_25_50_25/layout--threecol-25-50-25.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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. * - 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. #}
  15. {%
  16. set classes = [
  17. 'layout',
  18. 'layout--threecol-25-50-25',
  19. ]
  20. %}
  21. {% if content %}
  22. <div{{ attributes.addClass(classes) }}>
  23. {% if content.top %}
  24. <div {{ region_attributes.top.addClass('layout__region', 'layout__region--top') }}>
  25. {{ content.top }}
  26. </div>
  27. {% endif %}
  28. {% if content.first %}
  29. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  30. {{ content.first }}
  31. </div>
  32. {% endif %}
  33. {% if content.second %}
  34. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  35. {{ content.second }}
  36. </div>
  37. {% endif %}
  38. {% if content.third %}
  39. <div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  40. {{ content.third }}
  41. </div>
  42. {% endif %}
  43. {% if content.bottom %}
  44. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  45. {{ content.bottom }}
  46. </div>
  47. {% endif %}
  48. </div>
  49. {% endif %}

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