Lets you embed references to pages in CFML.

You can embed cfinclude tags recursively.

This tag cannot have a body.

This tag is also supported within <cfscript>

<cfinclude template=string cachedwithin=object runonce=boolean >
Attribute Description
string, required

A logical path to an existing page.

object, optional

possible values are: String "request": If original content was created within the current request, cached content data is used. a timespan (created with function CreateTimeSpan): If original content date falls within the time span, cached content data is used.

To use cached data, the function must be called with the exact same arguments.

boolean, optional

if set to true, the given template is only included once within the current request.


Format for Cfinclude

<cfinclude template="test.cfm">

See also