{% set current_endpoint = url_for(request.endpoint)[1:].split("/")[-1].strip().replace('_', '-') %}
{% if current_endpoint == "configs" %} SERVICE MANAGER {% else %} FILE MANAGER {% endif %}
{% for folder in folders %} {% for child in folder['children'] recursive %} {{loop(child['children'])}} {% endfor %}
{% endfor %}