{% set attr_class = segment.attributes.class ? ' class="' ~ segment.attributes.class|e ~ '"' %} {% set attr_extra = '' %} {% if segment.attributes.extra %} {% for attributes in segment.attributes.extra %} {% for key, value in attributes %} {% set attr_extra = attr_extra ~ ' ' ~ key|e ~ '="' ~ value|e('html_attr') ~ '"' %} {% endfor %} {% endfor %} {% endif %} {% set offcanvas %} {% for child in segment.children %} {% include '@nucleus/layout/' ~ child.type ~ '.html.twig' with { 'segments': child.children } %} {% endfor %} {% endset %} {% if segment.attributes.sticky or offcanvas|trim %}