Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Breadcrumb template component for Craft CMS based on Seomatic plugin. More info on
{% v1 %}
% set breadcrumbLinks = seomatic.jsonLd.get('breadcrumbList').itemListElement %}
{% if breadcrumbLinks|length > 1 %}
<nav class="breadcrumb" aria-label="{{'breadcrumbs'|t}}">
{% for link in breadcrumbLinks %}
<li class="{{loop.last ? 'is-active'}}" {{loop.last ? 'aria-current="page"'}}>
<a href="{{ link.item['@id'] }}">
<span itemprop="name">{{ link.item['name'] }}</span>
{% endfor %}
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.