Hi. If you want to change the layout for all actions of your controller, you can add this line near var uses() Var $layout = "default_news";
Otherwise you can change the layout for an especific action, adding the line INSIDE the action. $this->layout = "default_news"; Got it? On Saturday, January 15, 2011, John Maxim <goog...@gmail.com> wrote: > TYPO: I mean I created DEFAULT_NEWS.ctp > > On Jan 15, 10:35 pm, John Maxim <goog...@gmail.com> wrote: >> Hi, >> >> How am I going to set a different layout for my News::controller ? >> Currently, I'm using default.ctp for all controllers. I created >> another layout called news_default.ctp in app/views/layout/ >> >> So upon reading this:http://book.cakephp.org/view/1080/Layouts >> >> I created in users::controller >> >> function viewActive() { >> $this->layout = 'default_news'; >> } >> >> But where am I going to place this: var $layout = 'default_news'; >> ? >> >> How does it know when to use default_news.ctp when we browse to >> news::controller? >> >> This is a bit confusing. >> >> Can anyone explain a bit more in depth and clearer? >> >> Thanks, >> Maxim > > 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 cake-php@googlegroups.com > To unsubscribe from this group, send email to > cake-php+unsubscr...@googlegroups.com For more options, visit this group at > http://groups.google.com/group/cake-php?hl=en > -- -- Renato de Freitas Freire ren...@morfer.org 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 cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en