×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Add breadcrumbs

Thomas Walker

Thomas Walker Last update: Oct 17, 2017

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).

2x2.12
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok