Skip to content

Instantly share code, notes, and snippets.

@gdecider
Created February 14, 2018 11:09
Show Gist options
  • Save gdecider/66d8af79b84cbb70e718f9b3d3f1ad0d to your computer and use it in GitHub Desktop.
Save gdecider/66d8af79b84cbb70e718f9b3d3f1ad0d to your computer and use it in GitHub Desktop.
Битрикс Ш навигационная цепочка
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
//delayed function must return a string
if(empty($arResult))
return "";
$strReturn = '<div id="block-breadcrumbs"><ul>';
$arResult[count($arResult)-1]['ISLAST'] = true;
foreach($arResult as $arItem) {
if(isset($arItem['ISLAST'])) {
$strReturn .= '<li>'.$arItem['TITLE'].'</li>';
} else {
$strReturn .= '<li><a href="'.$arItem['LINK'].'">'.$arItem['TITLE'].'</a></li>';
}
}
$strReturn .= '</ul></div>';
return $strReturn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment