Yii Breadcrumbs & Zurb Foundation
By makeaweli
- 1 minutes read - 82 wordsCustomizing the Yii breadcrumb widget to output your preferred markup is pretty simple. I recently worked on integrating the Zurb Foundation CSS framework with this widget.
You just need to modify the following three properties of the widget:
- tagName
- activeLinkTemplate
- inactiveLinkTemplate
<?php if(isset($this->breadcrumbs)):?>
<?php $this->widget('zii.widgets.CBreadcrumbs', array(
'links'=>$this->breadcrumbs,
'homeLink'=>false,
'tagName'=>'ul',
'activeLinkTemplate'=>'
<li>
<a href="{url}">{label}</a>
</li>',
'inactiveLinkTemplate'=>'
<li class="current">
<a href="#">{label}</a>
</li>',
'separator'=>'',
)); ?>
<!-- breadcrumbs -->
<?php endif?>
The Yii documentation team did a great job explaining all the features of this widget.