Answer the question
In order to leave comments, you need to log in
How to fix breadcrumbs in Bitrix?
Hello, I installed the bitrix breadcrum component, but they incorrectly show the page path, i.e. there generally displays the title of the site simply on the pages.
The code itself:
<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
//delayed function must return a string
if(empty($arResult))
return "";
$strReturn = '<div class="bx_breadcrumbs"><ul>';
$num_items = count($arResult);
for($index = 0, $itemSize = $num_items; $index < $itemSize; $index++)
{
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
if($arResult[$index]["LINK"] <> "" && $index != $itemSize-1)
$strReturn .= '<li><a href="'.$arResult[$index]["LINK"].'" title="'.$title.'">'.$title.'</a></li>';
else
$strReturn .= '<li><span>'.$title.'</span></li>';
}
$strReturn .= '</ul><div class="clearboth"></div></div>';
return $strReturn;
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question