Wednesday, April 27, 2011

Re: $this->layout implementation in a controller

class MyController extends AppController {
function beforeFilter(){
$this->layout = 'other';
}
}

OR

class MyController extends AppController {
function beforeRender(){
$this->layout = 'other';
}
}

On 28 tra, 07:41, thom <cyber.phanto...@gmail.com> wrote:
> Hello,, I just wonder about how to make all function in a controller
> to 'use' $this->layout. Is it possible? Or It just can be done via
> adding the syntax into each function.
>
> Note : I have a controller that has a different layout from the others
> controllers.
> --
> Regards,,,
> mastantohttp://www.mastanto.comhttp://thom-sharing.blogspot.com

--
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: