How to hide main menu in login page?

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.

You should render menu only if !Yii::app()->user->isGuest and has permissions to view admin page (if you are using RBAC).

Simple case:




if (!Yii::app()->user->isGuest)

    $this->widget('CMenu', ... );



Thanks for the tip, andy_s! I’ll start with the simple case because I haven’t installed RBAC yet, but it’s coming.