Create Url

Hi All,

I have Menu in Main.php like

<?php $this->widget(‘zii.widgets.CMenu’,array(


			array('label'=&gt;'Charts', 'url'=&gt;array('/media/index')),

Which is redirect to localhost/demo/index/media/index

instead of it i want it to be localhost/demo/index.

Please tell me how to do so.Thanks in advance.

What is your basePath ? What is your url format config (at config/main.php) ?

You can try to set:

array('label'=>'Charts', 'url'=>array('media/index')),

(without slash at start of media)


Please try like this.

array('label'=>'Charts', 'url'=>CController::createUrl('/media/index')),

Not working.

And yes my URL config is config.php changes.