Jump to content
Дизайн и модификация Invision Community IPBSkinsBETA
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
DimidroLlL

Некликабельные хлебные крошки

Recommended Posts

Здравствуйте. Хочу сделать чтобы последняя ссылка в хлебных крошках не была кликабельной.

Нашел код, который формирует хлебные крошки:

<?if( !defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true ) die();

if( empty( $arResult ) )
	return "";
// pr($arResult);
$strReturn = '<ul class="breadcrumb">';

for( $index = 0, $itemSize = count($arResult); $index < $itemSize; $index++ ){
	$title = htmlspecialcharsex($arResult[$index]["TITLE"]);
	if( $arResult[$index]["LINK"] <> "")
		$strReturn .= '<li><a href="'.$arResult[$index]["LINK"].'" title="'.$title.'">'.$title.'</a></li>';
	else{
		$strReturn .= '<li class="active">'.$title.'</li>';
		break;
	}
}

$strReturn .= '</ul>';
return $strReturn;?>

Пытался сделать сам, однако не слишком силен в php. просба подскахать как это реализовать.

 

Share this post


Link to post
if( $arResult[$index]["LINK"] <> "")

Заменить на

 

if( $arResult[$index]["LINK"] <> "" AND $index < $itemSize) 
  • Upvote 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...