
<div id="sidebar" class="flex-shrink-0 px-1">
    <ul class="list-unstyled" style="margin-top:15px;">
        {% set sidebar = app.session.get('sidebar') %}

        {% for nav01 in sidebar %}
            <li class="mb-3 pe-3 ps-1">
                <a class="px-0 py-2" data-bs-toggle="collapse" data-bs-target="#{{nav01.label}}-collapse" aria-expanded="false" >
                    <i class="{{ nav01.fonticon }} fa-fw"></i> 
                    {{ nav01.label }}
                </a>

                {% if nav01.childs is defined %}
                    <div class="collapse" id="{{nav01.label}}-collapse" style="">
                        <ul class="btn-toggle-nav list-unstyled fw-normal">
                        {% for nav02 in nav01.childs %}
                            <li class="py-1 ps-3">
                                <a href="{{ path(nav02.path) }}">
                                    <i class="{{ nav02.fonticon }} fa-fw"></i> {{ nav02.label }}
                                </a>
                            </li>
                        {% endfor %}
                        </ul>
                    </div>
                {% endif %}
            </li>
        {% endfor %}
    </ul>
</div>
      
  