Skip to content

View Helpers

includeLayout()

includeLayout() — returns string

Available in: controller Category: Miscellaneous Functions

Includes the contents of another layout file. This is usually used to include a parent layout from within a child layout.

NameTypeRequiredDefaultDescription
namestringnolayoutName of the layout file to include.
<!--- Make sure that the `sidebar` value is provided for the parent layout --->
<cfsavecontent variable="categoriesSidebar">
	<cfoutput>
		<ul>
			#includePartial(categories)#
		</ul>
	</cfoutput>
</cfsavecontent>
contentFor(sidebar=categoriesSidebar);

<!---Include parent layout at `views/layout.cfm`--->
#includeLayout("/layout.cfm")#