Breadcrumbs
Breadcrumbs are a common form of site navigation designed to give the user heirarchial context. Much like the crumbs left by a little German boy named Hansel (so 🔥 right now), they lead from where you are, all the way back home.
Example
Here’s an example of what breadcrumbs might look like, as well as a code example in use.
<ul class="breadcrumbs">
{{ nav:breadcrumbs }}
<li{{ if is_current }} class="current"{{ /if }}>
<a href="{{ url }}">{{ title }}</a>
</li>
{{ /nav:breadcrumbs }}
</ul>
Parameters
url
string |
Defaults to your current page, but can be set to anywhere if necessary. |
---|---|
include_home
boolean TRUE |
You can choose to turn off the home page in the breadcrumbs, opting to start the crumbs from the first level nav item. |
reverse
boolean TRUE |
Reverse the output of the breadcrumbs. |
trim
boolean TRUE |
Trim the whitespace from each iteration of the loop. |
Variables
is_current
boolean |
Whether the current page is the URL being viewed. Useful for outputting active states. |
---|---|
page data
mixed |
Each page being iterated has access to all the variables inside that page. This includes things like |