breadcrumbs

Table of contents

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.

{% for breadcrumb in breadcrumbs %}
  <a href="{{breadcrumb.url}}">{{breadcrumb.title}}</a>
  {% unless forloop.last %} | {% endunless %}
{% endfor %}
Input
<a href="/">Home</a> |
<a href="/blogposts">Blogposts</a> |
<a href="/blogposts/news-message">News Message</a>
Output

Need help?

Do you have any question which is not answered in this knowledge base? Contact us. We are here to help you.