{% set classes = [ 'bef-links', is_nested ? 'bef-nested' ] %} {% set is_nested = true %} {% for name, value in hiddens %} {% endfor %} {% set current_nesting_level = 0 %} {% for child in children %} {% set item = attribute(element, child) %} {% if child in selected %} {% set new_nesting_level = attribute(depth, child) ?? 0 %} {% endif %} {% set new_nesting_level = attribute(depth, child) ?? 0%} {% include '@better_exposed_filters/bef-nested-elements.html.twig' %} {% set current_nesting_level = new_nesting_level %} {% endfor %}