Wednesday, September 7, 2011

Re: Cake 2 - What is the simplest way to change layout for errors?

On Sep 7, 6:57 am, "Dr. Tarique Sani" <tariques...@gmail.com> wrote:
> What would be the simplest way to change the layout for *all* errors
> and exceptions in Cake 2.0 RC?

app controller

function beforerender() {
parent::beforRender();
if ($this->name === 'CakeError') {
$this->layout = 'pink';
}
}

probably.

Though personally I prefer $this->layout = x in the error/view files

hth,

AD

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: