ColdFusion Tutorial – ColdFusion Templates
Page 1 — ColdFusion Templates
OK. So you read introduction, and you’re dying to hear about these exciting ColdFusion templates. Just relax and sit back. All questions will be answered. Templates are the key to the whole ColdFusion experience. Once you master the basics, you’ll notice you have lots more free time on your hands.
Essentially, a template is a standard HTML page with some extra coding inserted before the <HEAD> tag. This code tells ColdFusion which data source you want to access and sets up variables that you’ll use further down the page in the actual HTML code. Templates use the file extension .cfm (in recent versions of the software) or .dbm (in versions prior to 3.0). Older versions of ColdFusion require that all templates be stored in a single directory that’s defined in the ColdFusion Administrator, but newer versions aren’t nearly as picky and let you put templates any old place on the site. As with a standard site, try to use a logical system for naming your template files and directories. Or as we discussed earlier, for increased job security, name them as cryptically as you can and scatter them all over hell.
ColdFusion has a nifty program called CF Studio that provides a visual interface for building templates, but that means more dollars out of pocket. It’s pretty simple to build basic templates in a standard text editor, and doing so will greatly increase your knowledge of the workings of ColdFusion as well as make you a hot property at parties.