HTML breadcrumbs can help users to easily navigate through a lot of pages and reduce the time to navigate to a higher-level page.
Before you begin: To create breadcrumbs, a template must exist.
To create HTML breadcrumbs:
-
Open your template folder.
-
Go to src > main > resources > template in your template directory.
-
Open the page.vm file with your favorite text editor.
-
Insert the following lines at the respective place:
#foreach($breadcrumb in $pageHierarchyHelper.getBreadcrumbs($source.Id)) #if($velocityHasNext)<a href="$context.getLinkNamingStrategy().generateLinkString($breadcrumb)">$breadcrumb.DisplayTitle</a> »#else <strong>$breadcrumb.DisplayTitle</strong> #end #end
-
Save the page.vm file and rebuild the template by executing the atlas-package command in the terminal.