breadcrumbs

Breadcrumbs allows you to iterate through the Post tree structure, from root up to the current post. It can help the site’s visitor to navigate ‘up’ from the current post in the site. The breadcrumbs object is an array filled with objects representing each post ‘above’ the current post, including the current post. Each object in the breadcrumbs array contains a title and a url attribute.

Input:

{% for breadcrumb in breadcrumbs %} <a href="{{breadcrumb.url}}">{{breadcrumb.title}}</a> {% unless forloop.last %} | {% endunless %} {% endfor %}

Output:

<a href="/">Home</a> | <a href="/blogposts">Blogposts</a> | <a href="/blogposts/news-message">News Message</a>