Skip to content

Controller

usesLayout()

usesLayout() — returns void

Available in: controller Category: Configuration Functions

Used within a controller’s config() function to specify controller- or action-specific layouts.

NameTypeRequiredDefaultDescription
templatestringyesName of the layout template or function name you want to use.
ajaxstringnoName of the layout template you want to use for AJAX requests.
exceptstringnoList of actions that should not get the layout.
onlystringnoList of actions that should only get the layout.
useDefaultbooleannotrueWhen specifying conditions or a function, pass in true to use the default layout.cfm if none of the conditions are met.