Layout Components 1.0 Documentation: Switch Layout

Layout Components Information

Download from RIA Forge

Blog Entries

Switch Layout

You may want to use a layout other than the Default layout on a page. Here are examples of using the "Home" layout (assuming there is a "Home.cfc" in your "layouts" folder).

Using cf_Template

<cf_Template use="Home" title="Page Title">

(some content here)


Using cf_layout

<cf_layout switch="Home">

<cf_layout title="Page Title">

(some content here)


Direct CFC Code

<cfset layout = layout.switchLayout("Home")>

<cfoutput>#layout.head("Page Title")#</cfoutput>

(some content here)