How To... Build a Crumbtrail
Setting up a crumbtrail is very similar to setting up a LIST for navigation, but instead the PATH tag is used.
1. Build the PATH tag.
Create a new snippet and construct a path tag. The minimum attributes you will require are the type, direction and references to other snippets that provide templates for the items of the crumbtrail. As many crumbtrails use a different style for the last item in the list, we also provide a template for this item: lastitemtemplate.
%PATH%(
type=ul,
direction=asc,
itemtemplate=pathlink,
lastitemtemplate=lastpathlink)%
This tag will create an unordered list of items that start with the root item (because the direction is ascending) and will display items based on the 'pathlink' and 'lastpathlink' templates. Use css to display the unordered list horizontally.
2. Create the itemtemplate and lastitemtemplate snippets.
The exact format of these will be specific to your own requirements, but if using both templates, normal crumbtrail usage dicates that all items bar the last will be links. Below is an example itemtemplate, that is built around a link, and below that a lastitemtemplate that just displays a label.
<li><a href="%LINK%">%TITLE%</a> / </li>
<li>%TITLE%</li>
RENDERED OUTPUT
Page 1 / Page 1a / Page1b / Page 1c