• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

CFINCLUDE

The CFINCLUDE tag will likely be your first encounter with code reuse when developing ColdFusion applications. The CFINClUDE tag enables you to embed existing ColdFusion templates into your current template by referencing the template names. Consider the following example:

<!---This is the code for the template PageOne.cfm---> 
<HTML> 
     <HEAD> 
          <TITLE>Page One</TITLE> 
     </HEAD> 
<BODY> 
<H1>This is Page One!</H1> 
</BODY> 
</HTML> 
<!---End of PageOne.cfm---> 

<!---This is the code for the template PageTwo.cfm---> 
<HTML> 
        <HEAD> 
                 <TITLE>PAGE TWO</TITLE> 
        </HEAD> 
<BODY> 
<H1>This is Page Two!</H1> 
</BODY> 
</HTML> 
<!---End of PageTwo.cfm---> 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint