Free-Conversant Support / Macro: Breadcrumbs
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> Breadcrumbs

<!--#breadcrumbs-->

Overview

The breadcrumbs macro produces a navigational aid that's been called "essential" to making a site easy to use. Breadcrumbs are also known as "Yahoo-style paths" and are used to help the user understand where he is on your web site.

This macro does not require any parameters (attributes), but does accept a number of optional parameters. The default behavior is acceptable for most situations, as it produces a fairly standard set of "breadcrumbs". Any of the optional parameters may be used to modify the output of the macro with anything from a minor tweak to a completely different look.

Optional Parameters

  • rootPath - the path to the lowest level directory that should be available in the breadcrumbs
    • must begin with the id of the conversation and a slash, like "support/"
    • the rootPath must point to a directory
    • if the current page is not a child of (that is, if it is not contained by) the rootPath directory, then the macro returns nothing (an empty string of text)
    • the default value is the root of the current conversation
    • see example two, below

  • includeRoot - (true or false) - determines if the root directory, pointed to by rootPath (above), should be included as a breadcrumb in the output
    • in other words, if the rootPath points to the /articles/ directory, setting this value to false will only produce breadcrumbs for the children of the rootPath, and no breadcrumb will be provided for the root directory itself

  • defaultItem - the name of the file that should be used for a breadcrumb in each directory
    • if defaultItem is not provided (or if an item can't be found in the directory with the name provided), then the breadcrumb will be for the directory itself rather than a default page
    • provide multiple values in defaultItem by separating them with commas, like this: "index,index.html"

  • separatorText - the text that goes between (separates) each breadcrumb
    • default value is  >> , which looks like:  >> 
    • another common choice is  / , which looks like:  / 

  • itemTemplate - the name of the template used to display each item in the breadrumb path except for the breadcrumb representing the current page
    • typically this template will use page macros like navTitle and pageTitle
    • if not provided, the default item template is "Breadcrumbs READONLY"

  • currentItemTemplate - the name of the template used to display ONLY the current item in the breadcrumb path
    • typically this template will display the current page's page title or nav title in bold, but not linked (as linking to the current page is not useful)
    • if not provided, the default current-item-template is "Breadcrumbs Current Item READONLY"

Examples

  1. <!--#breadcrumbs-->
  2. <!--#breadcrumbs rootPath="support/docs/"-->
    • Result: Documentation >> Macros >> Macro: Breadcrumbs
    • Produces breadcrumbs only if the current page is in the "docs" directory of the "support" site (so you won't see the breadcrumbs in the DG message used to create these docs)
View in DG