Layouts
The layouts array element is used to define implicit associations between layouts and views/folders, this does not mean that you need to register ALL your layouts. This is a convenience for pairing them, we are in a conventions framework remember.
Before any renderings occur or lookups, the framework will check this array of associations to try and match in what layout a view should be rendered in. It is also used to create aliases for layouts so you can use aliases in your code instead of the real file name and locations.
1
//Register Layouts
2
layouts = [
3
{
4
// The alias of a layout
5
name="",
6
// The layout file
7
file="",
8
// A list of view names to render within this layout
9
views="",
10
// A list of regex names to match a view
11
folders=""
12
}
13
14
// Examples
15
{ name="tester",file="Layout.tester.cfm",views="vwLogin,test",folders="tags,pdf/single" },
16
{ name="login",file="Login.cfm",folders="^admin/security"}
17
];
Copied!
Copy link
Edit on GitHub