Add breadcrumbs
Breadcrumbs can be added using $page.ancestors
, which generates a list of ancestors.
The following snippet shows how to include the ancestors:
page.vm
<ul class="breadcrumbs">
<li><a href="$home.link">Start</a></li>
#foreach($ancestor in $page.ancestors)
#if($velocityCount > 1) ## exclude home page
<li><a href="$ancestor.link">$ancestor.title</a></li>
#end
#end
<li><span>$page.title</<span></li>
</ul>
Result
This is how it looks like in the end (depending on how it is styled).