 {% for keyRes, node in ancestors %}
    {% if  not loop.last %}
        {% if isDesktop() %}
            {% set url = path('claro_desktop_open_tool', {'toolName': 'resource_manager', 'workspaceId': workspaceId }) %}
        {% else %}
            {% set url = path('claro_workspace_open_tool', {'toolName': 'resource_manager', 'workspaceId': workspaceId }) %}
        {% endif %}

        {% for keyPath, pathItem in ancestors %}
            {% if keyPath == 0 %}
                {% set url = url~"?" %}
            {% else %}
                {% set url = url~"&" %}
            {% endif %}
            {% if keyPath < keyRes %}
                {% set url = url~"_breadcrumbs[]="~pathItem.id %}
            {% endif %}
        {% endfor %}

        {% set url = url~"#resources/"~node.id %}

        <li>
            <a href="{{ url}}">
                {% if not isDesktop() and loop.first %}
                    {{ 'resources' | trans({}, 'platform') }}
                {% else %}
                    {{ node.name }}
                {% endif %}
            </a>
        </li>
    {% endif %}
{% endfor %}
