Hej All.
Is it possible to show an extended menu after a login.
I got for example on start only Home and login. And after the user succesfully has loged, the menu get a point more, calls backend.
Hej All.
Is it possible to show an extended menu after a login.
I got for example on start only Home and login. And after the user succesfully has loged, the menu get a point more, calls backend.
Maybe something like this, you can populate the array menu.
its just tips…
$menu[] = array('label'=>'Home', 'url'=>array('site/index'));
if(!Yii::app()->user->isGuest){
$menu_name = menu::model()->findAll(array('select'=>'menu_name', 'condition'=>''));
foreach($menu_name as $key => $value){
$menu[$menu_name] = array('label'=>''.$menu_name.'', 'url'=>'#', 'subs'=>$submenu[$value->menu_name]);
}
}
$menu[] = array('label'=>'Login', 'url'=>array('site/login'));
$this->widget('application.components.JQuerySlideTopMenu.JQuerySlideTopMenu', array(
'items'=>$menu,
));
You can use visible property for menu item with something like !Yii::app()->user->isGuest.
thx guys.
Got it.