ColdFusion Tutorial

Use cfinclude to import html pages.

The cfinclude tag can also be used to import other pages than cfm pages.

This example will show how to import an htm page into a coldfusion page.

In this example we build a header cfm file, a footer cfm file and a link htm page and using cfinclude to include those templates to the 'output page'.

The header.cfm file:

<html>

<head>

<title>Your Title</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="Language" content="en">

<meta name="description" content="Site Description">

<meta name="keywords" content="primary_keyword, secondary one, secondary two, secondary three, SECONDARY ONE, SECONDARY TWO, SECONDARY">

<meta name="robots" content="INDEX,FOLLOW">

</head>

<body bgcolor="#99CCFF">

<div align="center">Navigation links</div>

The footer.cfm file:

<br>

<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Copyright &copy; 19xx - <cfoutput>#DatePart("yyyy", Now())#</cfoutput>. All Rights Reserved.</font> </div>

</body></html>

The link.htm file:

<a href="http://www.applayit.com" target="_blank">ApplayIt</a>

The output.cfm file:

<!--- We include the header.cfm file. --->

<cfinclude template="header.cfm">

<br><br>

<!--- We include the link.htm page. --->

<cfinclude template="link.htm">

<!--- We include the footer.cfm file. --->

<cfinclude template="footer.cfm">

This will give the following output:

Navigation links


ApplayIt

Copyright ? 19xx - 2005. All Rights Reserved.

ColdFusion Tutorial test

Use cfinclude to import html pages.

No test is available or implemented for this ColdFusion Tutorial.

No User Comments.

No User Comments, be the first one to write your comments?

Add your comments

Your Name*:
Your Email:
Site URL:
Site Name:
Comemt Title*:
Your Comment*:
Key Phrase*:
3bG
Your IP Address: 38.103.63.62
 

ScandicWeb is own by Scandic Systems LTD [UK] Company No. 5984000. All other trademarks and copyrights are the property of their respective holders.

[Home [Site Map [Privacy Statement [Site Feedback] [About ScandicWeb]


[ColdFusion [Flash [Search Engine Optimization [Graphics [Cascading Style Sheets (CSS) [JavaScript (JS) [Software]

Partner sites: ScandicSoft


Server time: 19. November 2008 Wednesday