On Apr 7, 8:39 am, narendra <[email protected]> wrote:
> HI !,
> I am new to CakePHP,
> I have a problem like this
> i have a login page with one layout after successful login a different
> layout, please help me how to solve this problem.
>
> Now in default.ctp i have written login page code which is having one
> layout(appearance) i have to show another layout after login. How can
> i do this please help me out.
in AppController's beforeFilter():
$this->layout = 'default';
if ($this->Auth->user('id'))
{
$this->layout = 'other_layout';
}
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
To unsubscribe, reply using "remove me" as the subject.