Views: 2641 (Data available since 06.02.2017)
By default, the navigation chain point names are managed by the system through the section properties.
The name of the link to the site section in the navigation chain is specified using the field Section Name in the setup form of the section properties.
//--- 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