User Guide

Table Of Contents
161
CHAPTER 8
Creating ColdFusion Elements
This chapter describes ColdFusion elements that you create. These elements let you to organize
your code. When you create any of these elements, you write your code once and use it, without
copying it, in many places. This chapter describes the elements that you can create and their
features, and provides advice on selecting among the elements.
Contents
About CFML elements you create . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Including pages with the cfinclude tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
About user-defined functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Using ColdFusion components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Using custom CFML tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
Using CFX tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Selecting among ColdFusion code reuse methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
About CFML elements you create
ColdFusion provides you with several techniques and elements to create sections of code that you
can use multiple times in an application. Many of the elements also let you extend the built-in
capabilities of ColdFusion. ColdFusion provides the following techniques and elements:
ColdFusion pages you include using the cfinclude tag
User-defined functions (UDFs)
ColdFusion components
Custom CFML tags
CFX (ColdFusion Extension) tags
The following sections describe the features of each of these elements and provide guidelines for
determining which to use in your application. Other chapters describe the elements in detail. The
last section in this chapter includes a table to help you choose among these techniques and
elements for different purposes.