Tags · Functions · Objects
Lucee Tag Reference
Choose a tag:

Tag <CFINCLUDE>

Lets you embed references to pages in CFML. You can embed cfinclude tags recursively. For an additional method of encapsulating CFML

Body

This tag can't have a body.

Example

	<cfinclude
		[cachedwithin="object"]
		[runonce="boolean"]
		template="string">
	
This tag is also supported within cfscript
	<cfscript>
		include [boolean expression];
	</cfscript>

Attributes

The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name Type Required Description
cachedwithin any No possible values are:
String "request": If original content was created within the current request, cached content data isused.
a timespan (created with function CreateTimeSpan): If original content date falls within the time span, cached content data isused.

To use cached data, the function must be called with the exact same arguments. 
runonce boolean No if set to true, the given template is only included once within the current request. 
template string Yes A logical path to an existing page.