You can extend the class of the standard widget, if we are talking about the first yii, then this is the CBreadcrumbs class. If you look at the class, then there is the homeLink attribute, here is the standard code
/** * Renders the content of the portlet. */ public function run() { if(empty($this->links)) return; echo CHtml::openTag($this->tagName,$this->htmlOptions)."\n"; $links=array(); if($this->homeLink===null) $links[]=CHtml::link(Yii::t('zii','Home'),Yii::app()->homeUrl); elseif($this->homeLink!==false) $links[]=$this->homeLink; foreach($this->links as $label=>$url) { if(is_string($label) || is_array($url)) $links[]=strtr($this->activeLinkTemplate,array( '{url}'=>CHtml::normalizeUrl($url), '{label}'=>$this->encodeLabel ? CHtml::encode($label) : $label, )); else $links[]=str_replace('{label}',$this->encodeLabel ? CHtml::encode($url) : $url,$this->inactiveLinkTemplate); } echo implode($this->separator,$links); echo CHtml::closeTag($this->tagName); }
you just need in your class to override the creation of $ this-> homeLink
In Yii2, the principle should be the same.