Layout Conventions

I have a database crud application that I am working on. In my configuration file I have the following.

//layout Settings
layoutSettings = {
defaultLayout = “Layout.Main.cfm”
};

layouts = [
{ name = “security”,
file = “Layout.Security.cfm”,
folders = “security”
}
];

I have one general layout and layout for when your not logged in. Is there a reason I have to define this? Is there a convention/structure I can use to define layouts w/out having to set them up in the config? Just curious because I couldn’t find anything on layout conventions, thanks!

Hi Dan,

There are implicit declaration of layouts, but they are to associate a
view to a layout.

For different layouts depending on state, you probably want to
override the default layout in the main.onrequestStart (or an
inceptor) using setLayout

- John

I have done a bunch of fw/1 applications and I really like how the layouts work. It just makes a little more sense to me that you should follow some kind of convention instead of having to configure layouts.

  • **layouts/**section/item.cfm – The view-specific layout
  • **layouts/**section.cfm – The section-specific layout
  • layouts/default.cfm – The site-wide layout