Views: 3289 (Data available since 06.02.2017)
How to Add Own Point to the Navigation Chain?
Use the method AddChainItem() :
$APPLICATION->AddChainItem("About us", "/about/index.php");
Only infoblock names are shown in the navigation chain. In addition, page headers (e.g., contacts) and “Home” header are not displayed. What is the problem?
N must be set in the page properties in the field
NOT_SHOW_NAV_CHAIN of the page properties.
For the remaining pages, it is necessary to check if the headers are set in the section properties. It is section headers that are used to create points of the navigation chain.
The home page can also fail to display due to the incorrectly set option Ordinal of item from which to build the chain in the parameters of the Breadcrumb component: 0 (default value) means that the navigation chain will be built starting from the site root. If the field Path for which the navigation chain is to be built is completed, the point number is included in the indicated path.
The navigation chain has the catalog name repeated twice: Home/Catalog/Dresses/Dresses.
The first link to the catalog looks as follows:
and the second:
The first name is taken from the properties of the dresses directory (file .section.php) and the second is determined by the component located on the page (in this case, the address of the page section.php).
Note: For example, the parameters of the News (bitrix:news) component contain the relevant options: Include information block into navigation chain and Add Section name to breadcrumb navigation.
The element repetition in the navigation chain can also be caused by the presence of several components on the pages that are set to add their points to the chain.
How to ensure that the navigation chain has only a physical section present?
The complex component News is used to display a section from the infoblock. Apart from the physical section, an unclickable name of the section of the infoblock proper appears in the navigation chain. Neither section nor infoblock is included in the navigation chain settings.
Add the following line in the template:
"ADD_SECTIONS_CHAIN" => $arParams["ADD_SECTIONS_CHAIN"],