Executing Custom Tags; Accessing Tag Instance Data - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

The
tag uses the following syntax:
cfencode
cfencode infile outfile [/r /q] [/h "message"] /v"2"
The following table describes the options:
Option
Description
infile
The file you want to encode. The
outfile
Path and filename of the output file.
Warning: If you do not specify an output filename, a warning message asks if you want to
continue, and the encoded file will overwrite the source file.
/r
Recursive, when used with wildcards, recurses through subdirectories to encode files.
/q
Suppresses warning messages.
/h
Header, allows custom header to be written to the top of the encoded file(s).
/v
Required parameter that allows encoding using a specified version number. Use "1" for
pages you want to run on ColdFusion 3.x. Use "2" for pages you want to run strictly on
ColdFusion 4.0 and later.
Note: Although it is possible to encode binary files with cfencode, it is not recommended.

Executing custom tags

The following sections provide information about executing custom tags, including information
about handling end tags and processing body text.

Accessing tag instance data

When a custom tag page executes, ColdFusion keeps data related to the tag instance in the
structure. You can access the
thisTag
processing of the tag. The behavior is similar to the
the File scope).
ColdFusion generates the variables in the following table and writes them to the
structure:
Variable
ExecutionMode
HasEndTag
GeneratedContent
AssocAttribs
182
Chapter 9: Creating and Using Custom CFML Tags
cfencode
thisTag
Description
Contains the execution mode of the custom tag. Valid values are "start", "end",
and "inactive".
Distinguishes between custom tags that are called with and without end tags.
Used for code validation. If the user specifies an end tag,
True; otherwise, it is set to False.
The content that has been generated by the tag. This includes anything in the
body of the tag, including the results of any active content, such as
ColdFusion variables and functions. You can process this content as a
variable.
Contains the attributes of all nested tags if you use
available to the parent tags. For more information, see
exchange" on page
188.
tag does not process an encoded file.
structure from within your custom tag to control
tag-specific variable (sometimes called
File
thisTag
is set to
HasEndTag
to make them
cfassociate
"High-level data

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents