By default, the system provides users tools for managing navigation chain items with use of site section properties. The navigation chain item name is defined by the site section (reference to which this item contains) title. A section title can be defined in the Folder Properties form (for corresponding folder).
//--- The first parameter of the function AddChainItem() is the name
//--- to be shown in the navigation chain;
//--- the second parameter is the link URL.
//--- Parameter values can be both static and dynamic.
//--- In this example, section name is a static value, while
//--- the link is generated dynamically.
$APPLICATION->AddChainItem("Product details", "catalog.php?BID=".$arIBlock["ID"]."&ID=".$arSection["ID"]);
//--- The next example shows how to generate both parameters dynamically.
//--- Current name of the catalog section is used as the name.
To display the title of a current page in the navigation chain, call the function
AddChainItem() in file
footer.php, that is included after the main content is generated.
You can set some of the navigation chain elements to be displayed with no link, as a common text (for example, display the current page title without link):
This elements are creating by adding to the navigation chain template (file
chain_template.php) the following code:
$sChainBody .= "<a href="".$LINK."" class='".$strclass."'>".$TITLE."</a>";
$sChainBody .= "<font class='".$strclass."'>".$TITLE."</font>";
Some visual components are able to add to navigation chain the current page or news title, or, for example, catalog item name.
For example, the "Catalog" sequentially adds a catalog sections names according to the catalog structure.
Forum and forum themes names are added to the navigation chain the same way.
In this case the navigation chain element name for the current page is defined directly in the document with use of the