Skip to content

Instantly share code, notes, and snippets.

@veksa
Created Jul 19, 2014
Embed
What would you like to do?
Bitrix, стандартный шаблон breadcrubms
<?if( !defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true ) die();
if( empty( $arResult ) )
return "";
$strReturn = '<ul class="breadcrumb">';
for( $index = 0, $itemSize = count($arResult); $index < $itemSize; $index++ ){
$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
if( $arResult[$index]["LINK"] <> "" && $arResult[$index]['LINK'] != GetPagePath() )
$strReturn .= '<li><a href="'.$arResult[$index]["LINK"].'" title="'.$title.'">'.$title.'</a></li>';
else{
$strReturn .= '<li>'.$title.'</li>';
break;
}
}
$strReturn .= '</ul>';
return $strReturn;?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment