Breadcrumbs
I use breadcrumbs when a section has multiple levels; they help visitors find their way.
Generally, breadcrumbs should navigate users back to the top of the section, not home.
View the code for this example
{% from 'includes/breadcrumbs.njk' import breadcrumbs as breadcrumbs %}
{{ breadcrumbs({
classes: 'space--margin-bottom-s',
items: [{
title: 'Diary',
url: '#'
}, {
title: '1980',
url: '#'
}, {
title: 'April',
url: '#'
}]
}) }}
Nunjucks Macro parameters
Name | Type | Description |
---|---|---|
classes |
string | Classes to add to the breadcrumbs container. |
items |
array | Required. The items to be shown in the breadcrumbs list. |
items.url |
string | Required. The URL for each item. |
items.title |
string | Required. The display title for each item. |