I'm trying to somehow find a clean way to have dynamic layouts. I
want to have one master layout contains header and footer. Within
that, I have another level of Layouts, call them (Page Layouts),
within page layouts I'd like to have my views.
How can I setup this sort of inheritance so any child layouts would
inherit from a parent layout.
Someone will correct me if I'm wrong, but I don't think ColdBox really does the whole "nested" layout thing like FuseBox did. I have a ton of reusable pieces in my layout. I have a handler called ehLayout with an event and corresponding view for each separate chunk of page I want to reuse. The handler returns the rendered view and I include them and nest them however I want with #runEvent('ehLayout.upSellPod')# Each event is self-contained as far as what data it needs. I've found it to be quite flexible.
You can also use the method: RenderLayout() which you can explicitly tell the Renderer to render a sub layout anywhere. This way, you can do nested layouts. You can even pass an optional view argument that will be carried over to your pre-defined layout, so you can do “renderView(arguments.view)”.