Working With Breadcrumbs

The breadcrumb tag (./core/tags/webskin/breadcrumb.cfm) works based on where in the site overview tree it thinks your content is based. But when you are dealing with content types that don't have a home in the tree, that's a bit trickier; it ultimately defaults to the home page (or in truth application.fapi.getnavid("home")).

Of course there is a simple fix. The Breadcrumb tag is a bit more cunning and will look in the tree for a navigation alias that matches the content typename of the view being rendered.  For example, if you are using the breadcrumb tag with a dmNews content item it looks for an alias of "dmnews" (literallly application.fapi.getnavid("dmnews")).

To add an alias, simply open up the relevant menu (ie. dmnavigation) content item, and type in the typename as an alias to the navigation node in the tree. No coding required :)

Here's an example of an alias for a "podcast" content type hooking up the breadcrumb, for both a type view (or listing view) and a full page display of a single content item.


6017 views and 0 responses