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

Same filename in this branch
  1. 11.x core/themes/stable9/layouts/layout_discovery/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. 10 core/themes/stable9/layouts/layout_discovery/threecol_25_50_25/layout--threecol-25-50-25.html.twig
  7. 10 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:

  • 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/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. * - 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--threecol-25-50-25',
  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 %}
  31. <div {{ region_attributes.first.addClass('layout__region', 'layout__region--first') }}>
  32. {{ content.first }}
  33. </div>
  34. {% endif %}
  35. {% if content.second %}
  36. <div {{ region_attributes.second.addClass('layout__region', 'layout__region--second') }}>
  37. {{ content.second }}
  38. </div>
  39. {% endif %}
  40. {% if content.third %}
  41. <div {{ region_attributes.third.addClass('layout__region', 'layout__region--third') }}>
  42. {{ content.third }}
  43. </div>
  44. {% endif %}
  45. {% if content.bottom %}
  46. <div {{ region_attributes.bottom.addClass('layout__region', 'layout__region--bottom') }}>
  47. {{ content.bottom }}
  48. </div>
  49. {% endif %}
  50. </div>
  51. {% endif %}

Related topics


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