Breadcrumbs example
Single section
How it looks
(preview)
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"item": {
"name": "Section",
"@id": "https://www.gov.uk/section"
}
}
]
}
</script>
<nav data-module="ga4-link-tracker" aria-label="Breadcrumb" class="gem-c-breadcrumbs govuk-breadcrumbs govuk-breadcrumbs--collapse-on-mobile">
<ol class="govuk-breadcrumbs__list">
<li class="govuk-breadcrumbs__list-item">
<a data-ga4-link="{"event_name":"navigation","type":"breadcrumb","index_link":"1","index_total":"1"}" class="govuk-breadcrumbs__link" href="/section">Section</a>
</li>
</ol>
</nav>
How to call this example
<%= render "govuk_publishing_components/components/breadcrumbs", {
collapse_on_mobile: true,
breadcrumbs: [
{
title: "Section",
url: "/section"
}
]
} %>