{% trans_default_domain 'admin' %}

{% import _self as breadcrumbs %}

{% macro render_crumb_link(url, title) %}
    <a href="{{ url }}">{{ title | trans }}</a>
{% endmacro %}

{% macro render_crumb(crumb, route_type, title) %}
    {% import _self as breadcrumbs %}

    {{ breadcrumbs.render_crumb_link(
        admin_path(
            crumb.entity,
            route_type,
            crumb.meta.parent ? { (crumb.meta.parent.association ~ ''): app.request.query.get(crumb.meta.parent.association) } : {}
        ),
        title
    ) }}
{% endmacro %}

<div class="path">
    {{ breadcrumbs.render_crumb_link('darvin_admin_homepage', 'homepage.action.homepage.link') }}
    {% for crumb in crumbs %}
        {{ breadcrumbs.render_crumb(
            crumb,
            constant('Darvin\\AdminBundle\\Route\\AdminRouter::TYPE_INDEX'),
            crumb.meta.baseTranslationPrefix ~ 'action.index.link'
        ) }}
        {% if not loop.last or render_last %}
            {{ breadcrumbs.render_crumb(crumb, entity_route, crumb.entity) }}
        {% endif %}
    {% endfor %}
</div>

{% trans_default_domain 'admin' %}

{% import _self as breadcrumbs %}

{% macro render_crumb_link(url, title) %}
    <a href="{{ url }}">{{ title | trans }}</a>
{% endmacro %}

{% macro render_crumb(crumb, route_type, title) %}
    {% import _self as breadcrumbs %}

    {{ breadcrumbs.render_crumb_link(
        admin_path(
            crumb.entity,
            route_type,
            crumb.meta.parent ? { (crumb.meta.parent.association ~ ''): app.request.query.get(crumb.meta.parent.association) } : {}
        ),
        title
    ) }}
{% endmacro %}

<div class="path">
    {{ breadcrumbs.render_crumb_link(path('darvin_admin_homepage'), 'homepage.action.homepage.link') }}
    {% for crumb in crumbs %}
        {{ breadcrumbs.render_crumb(
            crumb,
            constant('Darvin\\AdminBundle\\Route\\AdminRouter::TYPE_INDEX'),
            crumb.meta.baseTranslationPrefix ~ 'action.index.link'
        ) }}
        {% if not loop.last or render_last %}
            {{ breadcrumbs.render_crumb(crumb, entity_route, crumb.entity) }}
        {% endif %}
    {% endfor %}
</div>

Fix homepage link in breadcrumbs.
Fix homepage link in breadcrumbs.
