Skip to content

Instantly share code, notes, and snippets.

@veksa
Created July 19, 2014 16:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veksa/b4da90596dc826fd2623 to your computer and use it in GitHub Desktop.
Save veksa/b4da90596dc826fd2623 to your computer and use it in GitHub Desktop.
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