<cfinclude>

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
template
string, required

A logical path to an existing page.

cachedwithin
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.

runonce
boolean, optional

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

Examples

Format for Cfinclude

<cfinclude template="test.cfm">

See also