3.1 Nested Layouts

Hi folks,

I’m not sure if there is a bug in 3.1 with regard to Nested Layouts but I followed the example here http://wiki.coldbox.org/wiki/WhatsNew:3.1.0.cfm#Easy_Nested_Layouts/Views and have not been able to get this to work

In my handler I have this code

local.content = renderView(view=“verify/user_verified”,layout=“TwoColumn”);

//TwoColumn is stored in the layouts directory

left column
#renderView()# right column

When I dump out the local.content and abort in my handler, the output of local.content is simply the rendered version of verify/user_verified WITHOUT the contents of TwoColumn as the layout. Am I doing something wrong here?



No because the layout is not called until the function exits.

Hi Andrew,

Okay that makes sense

Say my handler looks like this then…

function index(event){
var rc = event.getCollection();
var prc = event.getCollection(private=true);

//Set the page’s title
event.setValue(“title”, “”);
//Set the authentication handler
prc.xeh = “login.authenticate”;


general/login will by convention inherit the outer layout. How is it possible to tell general/login to inherit an inner layout as well as the outer layout?



Not sure, this is obviously something new in CB3.1 which I am not familiar with as yet.

But at a guess I would say that when the information is returned, the outer layout will render it like a normal view would be rendered.

I think I see where you are coming from, but I am not sure on the answer.

Had a look at the source code, and I am not sure it has been implemented as yet. As layout is not an argument for renderView unless I am missing something.

Thanks Andrew,

Luis, can you confirm if the What’s New in 3.1 docs is incorrect?