{% macro recursive_item_list(listItem, depth) %}
    {% for item in listItem %}
        {% set isCollapsed = depth >= 1 %}
        <div class="list-group-item node-treeview" data-treeview-item="{{ item.CODEDICO }}" data-treeview-depth="{{ depth }}" 
            onclick="Treeview.handleItemClick(event)"
        >
            {# _______________________________ 
                Indent #}
            {% for i in range(0,depth) | filter(item => item != 0) %}
            <span class="mx-small"></span>
            {% endfor %}
            {# _______________________________ 
                Button collapse (+/-) #}
            <label class="text-center" style="width: 2em" data-treeview-collapse-cta>
                <div class="{% if item.NODEPRESENT == 0 %}d-none{% endif %}">
                    <input class="d-none" type="checkbox" name="collapse" form="none" 
                        onchange="Treeview.setCollapse(event.target, ! event.target.checked)"
                    />
                    <span class="d-checked glyphicon glyphicon-minus"></span>
                    <span class="d-unchecked glyphicon glyphicon-plus"></span>
                </div>
            </label>
            {# _______________________________ #}

            {%- block label -%}{{ item.LIB01DICO }}{%- endblock -%}
            
            <span class="badge">{{ item.NODEPRESENT }}</span>
        </div>
        {# _______________________________ 
            Recusive child list #}
        <div class="d-none" data-treeview-childwrapper>
        </div>
    {% endfor %}
{% endmacro %}
{{ _self.recursive_item_list(listeUNSPSC, post.depth+1) }}