When I use CMenu widget in a module, it doesn’t highlight the active link by default:
<?php $this->widget('zii.widgets.CMenu', array(
'items'=>array(
array('label'=>'Home', 'url'=>array('default/index')),
),
)); ?>
This same code works fine in main application but just not in a module.
For the highlight to work I have to do this:
<?php $this->widget('zii.widgets.CMenu', array(
'items'=>array(
array('label'=>'Home', 'url'=>array('default/index'), 'active'=>$this->id == 'default'),
),
)); ?>
Or this:
<?php $this->widget('zii.widgets.CMenu', array(
'items'=>array(
array('label'=>'Home', 'url'=>array('admin/default/index'),
),
)); ?>
Is this a bug or am I doing something wrong?