check out View::renderLayout()
On Apr 17, 4:43 pm, maxmil <max...@gmail.com> wrote: > I would like to be able to define a kind of inheritance model for my > layouts. Thats to say be able to define a layout for a layout. > > Probably not very well explained, heres a concrete example. > > I have a generic layout for my application but in a group of pages i > need to add a panel to this layout. I have 3 options: > > 1) Add the panel to every page that needs it. This can be done > relatively cleanly using an element but if it were not a solid block > of html but a series of small blocks this is not ideal. > 2) Create a new layout with everything that the default layout has > plus the panel. This is not ideal because it duplicates the code in > the default layout. > 3) Set some view variables that cause the default layout to display or > hide the panel. This is ok but if i end up having many different > variations of the layout can make my default template complicated and > full of logic rather than simple markup. > > What i would really like would be to define a layout that inherits the > contents of another layout and adds its content to the > $content_for_layout variable. > > I don't think that this is possible, am i wrong? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---