cfinclude
Includes the content from the referenced file (template). The content may be executed as CFML, see compatibility info below. You can embed cfinclude tags recursively. For another way to encapsulate CFML, see cfmodule. (A CFML page was formerly sometimes called a CFML template or a template.)
<cfinclude template="" runonce="true|false">
include "template.cfm" runonce=true|false;
Attribute Reference
template string Required
A logical path to a CFML page.
runonce boolean
Default: false
false
CF 10+ If set to true, the given template is not processed again for a given request if it has already been processed.
Compatibility
ColdFusion:
CF9: Added the script syntax: include. CF11: Changed behavior such that only files with the extension cfm or cfml are compiled and executed by cfinclude (configurable in Application.cfc via this.compileextforinclude), all other files will be statically included.
BoxLang:
Version 1.0.0+
<bx:include> in BoxLang Examples Sample code using the cfinclude tag
CF 9+
include "mypage.cfm"; <cfinclude template="mypage.cfm">
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/cfinclude