You are here

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

Display Suite fluid 2 column template.

Available variables:

  • outer_wrapper: outer wrapper element
  • left_wrapper: wrapper element around left region
  • right_wrapper: wrapper element around right region
  • attributes: layout attributes
  • left_attributes: attributes for left region
  • right_attributes: attributes for right region
  • left: content of left region
  • right: content of right region

File

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