You are here

ds-2col-stacked-fluid.html.twig in Display Suite 8.2

Display Suite fluid 2 column stacked template.

Available variables:

  • outer_wrapper: outer wrapper element
  • header_wrapper: wrapper element around header region
  • left_wrapper: wrapper element around left region
  • right_wrapper: wrapper element around right region
  • footer_wrapper: wrapper element around footer region
  • attributes: layout attributes
  • header_attributes: attributes for header region
  • left_attributes: attributes for left region
  • right_attributes: attributes for right region
  • footer_attributes: attributes for footer region
  • header: content of header region
  • left: content of left region
  • right: content of right region
  • footer: content of footer region

File

templates/ds-2col-stacked-fluid.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Display Suite fluid 2 column stacked template.
  5. *
  6. * Available variables:
  7. * - outer_wrapper: outer wrapper element
  8. * - header_wrapper: wrapper element around header region
  9. * - left_wrapper: wrapper element around left region
  10. * - right_wrapper: wrapper element around right region
  11. * - footer_wrapper: wrapper element around footer region
  12. * - attributes: layout attributes
  13. * - header_attributes: attributes for header region
  14. * - left_attributes: attributes for left region
  15. * - right_attributes: attributes for right region
  16. * - footer_attributes: attributes for footer region
  17. * - header: content of header region
  18. * - left: content of left region
  19. * - right: content of right region
  20. * - footer: content of footer region
  21. */
  22. #}
  23. {% set left = left|render %}
  24. {% set right = right|render %}
  25. {% if (left and not right) or (right and not left) %}
  26. {% set layout_class = 'group-one-column' %}
  27. {% endif %}
  28. <{{ outer_wrapper }}{{ attributes.addClass(layout_class, 'ds-2col-stacked-fluid', 'clearfix') }}>
  29. {{ title_suffix.contextual_links }}
  30. <{{ header_wrapper }}{{ header_attributes.addClass('group-header') }}>
  31. {{ header }}
  32. </{{ header_wrapper }}>
  33. {% if left %}
  34. <{{ left_wrapper }}{{ left_attributes.addClass('group-left') }}>
  35. {{ left }}
  36. </{{ left_wrapper }}>
  37. {% endif %}
  38. {% if right %}
  39. <{{ right_wrapper }}{{ right_attributes.addClass('group-right') }}>
  40. {{ right }}
  41. </{{ right_wrapper }}>
  42. {% endif %}
  43. <{{ footer_wrapper }}{{ footer_attributes.addClass('group-footer') }}>
  44. {{ footer }}
  45. </{{ footer_wrapper }}>
  46. </{{ outer_wrapper }}>