cfinclude

Description

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

Category

Page processing tags

Syntax

<cfinclude template = "template_name"> 

See also

cfcache, cfflush, cfheader, cfhtmlhead, cfsetting, cfsilent

Attributes

Attribute
Description
template
A logical path to an existing page.

Usage

ColdFusion searches for included files as follows:

Example

<!--- This example shows the use of cfinclude to paste
pieces of CFML or HTML code into another page dynamically --->
<html>
<head>
  <title>cfinclude Example</title>
</head>

<body>
<H3>cfinclude Example</H3>

<H4>This example includes the main.htm page from the CFDOCS
directory. The images do not show up correctly because
they are located in a separate directory.
However, the page appears fully rendered within the
contents of this page.</H4>
<cfinclude template = "/cfdocs/main.htm">

</body>
</html>

LiveDocs comments are not longer enabled for ColdFusion 5.0. Please use one of the following resources instead.

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 5.0