Hi all,
I’m in a situation where I need to add css class to the links of a menu. Here is my code:
<?php
$this->widget('zii.widgets.CMenu', array(
'items'=>array(
array('label'=>'Home', 'url'=>array('site/index')),
),
'linkLabelWrapper' => 'span',
'htmlOptions'=>array('class'=>'art-menu'),
));
?>
which lets Yii render:
<ul class="art-menu" id="yw0">
<li class="active">
<a href="/app/index.php?r=site/index"><span>Donde comer</span></a>
</li>
</ul>
However, what I actually need is to add a class into de span that is into de link, something like this:
<ul class="art-menu" id="yw0">
<li class="active">
<a href="/app/index.php?r=site/index"><span class="css_class">Home</span></a>
</li>
</ul>
How can I do that?
Thanks a lot!
Alejandro.