Absolute url in CMenu

Hello

How to pass absolute url to CMenu item? By default url parameter goes to CHtml::normalizeUrl which uses Yii::app()->createUrl so with this code:

‘url’ => array(‘http://external-link.com’)

I get http://applicationdomain.com/http://external-link.com instead of just http://external-link.com

Thanks

Paweł

Hello Pawel

Pass the url as a string, not in an array. See CMenu documentation for more info on how to specify this parameter.

Et voilà:


$this->widget('zii.widgets.CMenu', array(

    'items'=>array(

        array('label'=>'Google', 'url' => 'http://www.google.com')

    ),

));

Thanks guys, I guess it was too easy to figure it out by myself :)