I'm a newbie to CakePHP and i'm trying to modify the login.ctp so that it would go to a different DIV tag. I already have a default.ctp layout placed in /v开发者_StackOverflow中文版iews/layout but i don't want the menus to appear on the login page when you bring up the site. How do i go about doing it?
Thanks, Lyman
make a login layout that has no menu, and in login(), set $this->layout= 'login';
in login function, save variable:
$this->set('nomenus', true);
in default.ctp check
if( empty($nomenus) ) {
... menus ...
}
精彩评论