User Guide
188 Chapter 10 Reusing Code
Managing Custom Tags
If you deploy custom tags in a multideveloper environment or distribute your tags
publicly, you can use additional ColdFusion capabilities:
• An advanced invocation syntax to resolve possible name conflicts
• Advanced security
• Template encoding
Resolving filename conflicts
To avoid errors caused by duplicate custom tag filenames, use the cfmodule tag in
the calling page. You must use either a
template or name attribute in the tag, but you
cannot use both The following table lists the basic
cfmodule attributes:
Securing custom tags
ColdFusion’s security framework enables you to selectively restrict access to
individual tags or to tag directories. This can be an important safeguard in team
development.
To avoid name conflicts, you can register custom tags as a security resource on the
ColdFusion Administrator Advanced Security page. For details, see Advanced
ColdFusion Administration.
Attribute Description
template Required if the
name attribute is not used. Specifies a relative path
to the cfm file. Same as
template attribute in cfinclude. Note that
the directory must have a mapping defined in ColdFusion
Administrator.
Example: <cfmodule template="../MyTag.cfm"> identifies a
custom tag file in the parent directory.
name Required if
template attribute is not used. Use period-separated
names to uniquely identify a subdirectory under the Custom Tags
root directory.
Example:
<cfmodule name="MyApp.GetUserOptions"> identifies
the file
GetUserOptions.cfm in the Custom Tags\MyApp directory
under the ColdFusion root directory.
attributes The custom tag’s attributes.