Installing Custom Tags; Local Tags; Shared Tags; Managing Custom Tags - MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Develop Manual

Developing web applications with coldfusion
Table of Contents

Advertisement

Chapter 7: Reusing Code
<CFIF ThisTag.ExecutionMode is 'end'>
<CFSET ThisTag.GeneratedContent =
</CFIF>

Installing Custom Tags

Custom tags are just like other .cfm files except that they must be installed in a specific
location to be accessible from the calling template. Because ColdFusion loads the first
instance it finds of the custom tag called by a template, you should avoid placing
copies of a custom tag in different locations.

Local tags

The ColdFusion engine first searches for a custom tag in the directory of the calling
template. This allows you to keep a custom tag file in the same directory as the page
that uses it.

Shared tags

To share a custom tag among applications in multiple directories, place it in the
Custom Tags folder under your ColdFusion installation directory, for example
C:\CFUSION\CustomTags
ColdFusion searches recursively for the Custom Tags directory, stepping down through
any existing subdirectories until the custom tag is found.

Managing Custom Tags

If you deploy custom tags in a multi-developer environment or distribute your tags
publicly, you may want to make use of additional ColdFusion capabilities:
An advanced invocation syntax to resolve possible name conflicts
Advanced security
Template encoding

Resolving file name conflicts

To avoid errors caused by duplicate custom tag file names, use the CFMODULE tag in
the calling template. Note that only one of the required attributes can be used in a
given instance of the tag.
'<!--#ThisTag.GeneratedContent#-->'>
. You can create sub-folders to organize custom tags.
85

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 4.5-DEVELOPING WEB and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Coldfusion 4.5

Table of Contents