Hi all:
My application has both a front and back end. I'd like to hide the backend menu until after the admin user logs in. How would I do that while keeping the default layout structure? Thanks for the help.
Page 1 of 1
How to hide main menu in login page?
#2
Posted 18 April 2010 - 07:44 AM
You should render menu only if !Yii::app()->user->isGuest and has permissions to view admin page (if you are using RBAC).
Simple case:
Simple case:
if (!Yii::app()->user->isGuest)
$this->widget('CMenu', ... );
#3
Posted 18 April 2010 - 08:40 AM
Thanks for the tip, andy_s! I'll start with the simple case because I haven't installed RBAC yet, but it's coming.
José
Share this topic:
Page 1 of 1

Help













