Idea of a new feature: breadcrumbs

Hi there,

I would like to know if there’s a possibility to had the feature of breadcrumb ?

I’m trying to add it in a theme, but nothing really works, if someone eventually has any idea/link to share ?

Thanks in advance!

Great day to all!

I’ve seen a pretty clever method using tags. Tags would allow content creators to construct their own breadcrumb structures regardless of how the page was nested in the site. Here’s a Handlebars example to get you started:

<ul class="breadcrumbs">
    {{#foreach tags}}
        <li class="breadcrumb-item"><a href="{{url}}">{{name}}</a></li>
    {{/foreach}}
    <li class="breadcrumb-item breadcrumb-item-current"><a href="{{url}}">{{title}}</a></li>
</ul>

Note that I’ve added the current page as the last breadcrumb item to show the current page the reader is on. Here’s a bit of CSS to get you going too:

.breadcrumbs {
	display: flex;
	list-style: none;
	padding: 0;
}

.breadcrumbs li + li::before {
	content: "/";
	opacity: 0.5;
	margin: 0 .2em;
}

.breadcrumb-item-current {
	font-weight: bold;
}

Hope this helps :blush:

3 Likes

Hey @DavidDarnes!

Thanks a lot for your quick answer, I’ll try it right away!

:slight_smile:

1 Like

@DavidDarnes

It perfectly works ! Thanks a lot ! :slight_smile:

1 Like

Awesome :fire: