sarvan75 / yii-user-management

Automatically exported from code.google.com/p/yii-user-management
0 stars 0 forks source link

YumAdminMenu and YumUserMenu in Module. #191

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Hi Nice work.

Will it be possible for you to add the path of the widget YumAdminMenu in the 
configuration ? 
The advantage is anytime you make an update we don't have to change the menu if 
we add things on it.

the procedure will be the following

user/controllers/YumController.php

    public function renderMenu() {
        if(Yii::app()->user->isAdmin()) $this->widget(Yum::module()->_YumAdminMenu);
        else if(!Yii::app()->user->isGuest) $this->widget(Yum::module()->_YumUserMenu);
    }

user/UserModule.php

public $_YumAdminMenu= 'application.modules.user.components.YumAdminMenu';
        public $_YumUserMenu= 'application.modules.user.components.YumUserMenu';

Original issue reported on code.google.com by disvro...@gmail.com on 1 May 2012 at 8:06