Skip to main content
Skip table of contents

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

HTML/XML
<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).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.