Skip to main content
Breadcrumb · Revision #1

How do I display the breadcrumb?

How do I display the breadcrumb?

To access the breadcrumb on the storefront, use the breadcrumb() function inside Twig files.

 It can be displayed by looping over each crumb like so:

<ul class="breabcrumb">
    {% for crumb in breadcrumb() %}
        <li class="crumb">
            {% if loop.last %}
                <span>{{ crumb.name }}</span>
            {% else %}
                <a href="{{ crumb.url }}">{{ crumb.name }}</a>
            {% endif %}
        </li>
    {% endfor %}
</ul>