A Path to No Where
We try to use good programming techniques at DDA. Code re-use is important and can be a time safer when making modifications in the future. If your header and footer are the same in all of your pages, you can use the cfinclude tag. First, by putting all of your header information in one file, and all of your footer information in another, then executing the cfinclude tag to bring in the contents of that file to the page where you want the information included. Another tag that could be used is the cfmofule tag, which has the capability of containing both the header and footer information in one file. In the file that is being called with the cfmodule, the top of the file has this <cfif thisTag.ExecutionMode is ‘start’> which then follows the header information followed by a <cfelse> statement then the footer information then closing the if statement with a </cfif>. In the file, using the cfmodule tag for the line that has <cfmodule template=””> would then include the header information and not include the footer information until the cfmodule tag is ended with </cfmodule>. Some other methods of including files are cffile and using custom tags.