{% 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 html %} {% if segment.children %} {% for segment in segments %} {% if segment.content %} {{ segment.content|raw }} {% else %} {% include ['@nucleus/content/' ~ segment.type ~ '.html.twig', '@nucleus/layout/' ~ segment.type ~ '.html.twig'] with { 'segments': segment.children } %} {% endif %} {% endfor %} {% endif %} {% endset %} {% if html|trim %}