This example shows how to nest a Layout inside another layout.
First we will make a full page layout by omitting the first parameter to the Layout Manager's constructor.
For this example we will create all 5 units in the full page layout.
Now that we have the first layout rendered and working, we will go back and listen for the
render event on the first layout to create the second one.
render event, we will call the
getUnitByPosition('center') on the first layout to get the center unit. Then we will call its method
.get('wrap'); to get us the root element of that unit.
Now that we have it, we will use it as the root element of the second layout and set it up as an element based layout.
Note: that we are passing the
parent config option. This config option will bind the 2 layouts together so that a resize on one will fire a resize on the other.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.