(Quick Reference)

nav:breadcrumb

Purpose

Renders a <ul> breadcrumb trail a scope within your navigation structure.

This works much like the menu tag except it renders only the items on the current activation path to represent the "location" the user is currently at in the navigation structure.

Example

<nav:breadcrumb/>

<%-- You may have different styling for the top vs. footer breadcrumb --%> <nav:breadcrumb id="top-breadcrumb"/> <nav:breadcrumb id="bottom-breadcrumb"/>

<%-- Custom rendering without ul wrapper --%> <div class="breadcrumb"> <nav:breadcrumb custom="true"> <p:callTag tag="p:smartLink" attrs="${linkArgs}"/> <g:if test="$"> &raquo; </g:if> </nav:breadcrumb> </div>

Note that with custom rendering the outer <ul> is not written out for you, you can write out entirely custom HTML.

Attributes

NamePurpose
pathOptional activation path to use. If not supplied, will use the current request's activation path which may have been set manually with setActivePath:navigationTags tag or by reverse-looking up the current controller and action
classOptional CSS class to apply to the outer <ul> tag. Defaults to "breadcrumb"
idOptional id attribute to apply to the outer <ul> tag. Defaults to no value
customOptional Boolean indicating that you want to handle rendering of the items directly. The body of the breadcrumb tag is used to render each item, and the body is passed the values item (the NavigationItem instance), linkArgs the map of arguments to pass to g:link to create a link to the target of the item, and first and last indicating whether the current item is the first and/or last in the list.