8 Yii::import(
'zii.widgets.CBreadcrumbs');
41 public function run() {
43 if (empty($this->links))
46 echo CHtml::openTag($this->tagName, $this->htmlOptions);
48 if ($this->homeLink === null) {
49 $this->homeLink = CHtml::link(Yii::t(
'zii',
'Home'), Yii::app()->homeUrl);
51 if ($this->homeLink !==
false) {
53 $active = (stripos($this->homeLink,
'<a') ===
false) ?
' class="active"' :
'';
54 echo
'<li' . $active .
'>' . $this->homeLink .
'</li>';
58 $lastLink = key($this->links);
63 echo strtr($this->activeLinkTemplate, array(
64 '{url}' => CHtml::normalizeUrl(
$url),
65 '{label}' => $this->encodeLabel ? CHtml::encode(
$label) :
$label,
68 echo
'<li class="active">';
69 echo str_replace(
'{label}', $this->encodeLabel ? CHtml::encode(
$url) :
$url, $this->inactiveLinkTemplate);
75 echo CHtml::closeTag($this->tagName);