104
CFINCLUDE
CFINCLUDE lets you embed references to ColdFusion pages in your CFML. If
necessary, you can embed CFINCLUDE tags recursively.
For an additional method of encapsulating CFML, see the
create custom tags in CFML.
Syntax
<CFINCLUDE TEMPLATE="template_name">
TEMPLATE
A logical path to an existing page.
Usage
ColdFusion searches for included files as follows:
Checks the directory in which the current page lives.
Searches directories explicitly mapped in the ColdFusion Administrator for the
included file.
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.
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>
The images do not show up correctly because
CFML Language Reference
CFMODULE
tag, used to
Need help?
Do you have a question about the COLDFUSION 4.5-CFML LANGUAGE and is the answer not in the manual?
Questions and answers