Navigation chain is connected in the site design template using the component Breadcrumb (bitrix:breadcrumb). Any number of templates, i.e. designs, may be set for these components. All of them are stored in the component folder /bitrix/components/bitrix/breadcrumb/templates/<template name>/. All the new templates will be displayed in the component settings. Thus, a navigation chain design template may be set for each site template. The structure of the navigation chain display template is similar to the menu display template.

Navigation chain and its design template are managed in the same way as when working with other 2.0 components. Using control button in the site edit mode you can easily access the component parameter change form or copy the component template and then edit it.

Building Navigation Chain and Developing Its External Appearance:

Navigation chain points are gathered starting from site root and ending with the current section. The file .section.php should be connected for each section. If this file has the variable of $sChainTemplate initiated, its value will be used as a path to the navigation chain template. While going through sections, each subsequent value of this variable overrides the previous one. Thus, the “deeper” the section is in the site section hierarchy, the more “important” its variable $sChainTemplate becomes.

If the path to the template is not determined after points of the navigation chain have been collected, the existence of the file is checked:

/bitrix/templates/current site template ID/chain_template.php

If such a file exists, the path to it is adopted as the path to the navigation chain template. Otherwise, the default value is used:

/bitrix/templates/.default/chain_template.php

If navigation chain is displayed, the navigation chain template will be connected each time at the next point of the chain. That is why its main task is to provide for the external appearance of only one point of the chain.

The main variables used in the template are as follows:

$sChainProlog - is the HTML code displayed before the navigation chain;

$sChainBody - is the HTML code which determines external appearance of one point of the navigation chain;

$sChainEpilog - is the HTML code displayed after the navigation chain;

$strChain - is the HTML code of the entire navigation chain collected by the time of template connection.

All variables shown will store HTML code determining the external appearance of the navigation chain.

In addition, the following additional variables will be available in the template: