Here’s what I have on the layout page:
<?php
$this->widget('zii.widgets.CBreadcrumbs', array(
'links'=>$this->breadcrumbs,
'separator'=>' > ',
'homeLink' => CHtml::link('Initial Page', Yii::app()->homeUrl)
));
?>
Here’s what I have on the view:
$this->breadcrumbs=array(Yii::t('srr', 'Routes'));
Here’s the folder and files structure:
views/activity/index
views/activity/route
When the user is on index he/she sees the breadcrumb like this:
Initial Page > Activity
When the user is on route he/she sees the breadcrumb like this:
Initial Page > Route
I wish to, when the user is on route page, to have a breadcrumb like this instead:
Initial Page > Activity > Route
Route is a static page, but has it’s own action (just in case) on activity controller.
How can we accomplish something like this ?
Breadcrumb
linksare just like this:So you can do this in the view: