Hello to everyone.
Somebody could help me with this problem.
I have a CMenu, and in one of the options of the menu i want to redirect my page to another one in the same project but this in this new page i had another main.
I try creating a new action in my controler:
$this->redirect('/index2');
but it has the next error "Unable to resolve the request "index2" ".
I don’t know if in my CMenu the item has the option to redirect or i need to do something else.
In other words I have this:
This is my CMenu in /protected/views/layout/main
<div id="mainmenu">
<?php $this->widget('zii.widgets.CMenu',array(
'items'=>array(
array('label'=>'Nuevo Servicio', 'url'=>array('/servicios/create'), 'visible'=>!Yii::app()->user->isGuest ),
array('label'=>'Reportes', 'url'=>array('/site/index'), 'visible'=>!Yii::app()->user->isGuest),
array('label'=>'Busqueda', 'url'=>array('/site/contact'),'visible'=>!Yii::app()->user->isGuest),
array('label'=>'Admin', 'url'=>array('/site/menuadmin'),'visible'=>Usuarios::isAdmin()),
array('label'=>'Cerrar Sesion', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),
//array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
),
)); ?>
</div><!-- mainme
In the "Admin" option i want to redirect to another page with a similar menu with other options.
I hope to be clear, and if someone knows the topic i need to read or the solution please tell me, I’d appreciate it.
if i write wrong excuse me, english is not my natural language.
Thanks