ColdFusion 4.0 Primer

3. CFIF, CFELSE, CFELSEIF
If you're familiar with any programming language you should be familiar with the concepts behind conditional code. I will now discuss the CF syntax for doing it. Every <CFIF> tag must have a matching </CFIF> tag, the <CFELSE> and <CFELSEIF> tags are completely optional. You may use as many <CFELSEIF> tags as needed, however you may use only one <CFELSE> tag per <CFIF> tag, and the <CFELSE> tag must always come last.

Figure 12. CFIF Example
<CFIF Login IS "True">  
Welcome.  
<CFELSEIF Login IS "False">  
Sorry, we could not log you in.  
<CFELSE>  
The was a problem processing your request, 
please try again or contact the server admin.  
</CFIF>

When comparing values within the CFELSEIF and CFIF tags you may use the following operators:

Also you can combine statements using AND or OR, such as: age LESS THAN "20" and sex is "male".

4. CFINCLUDE
To do SSI style includes using CF you should be using the <CFINCLUDE> tag.

Figure 13. CFINCLUDE
<CFINCLUDE TEMPLATE = "include.htm">

I think it is very straightforward and needs no explanation. However unlike SSI you can only use relative paths to the file to be included.