Generating A Tag; Variables Passed To The Layout Template - MACROMEDIA COLDFUSION STUDIO 4.5-USING COLDFUSION STUDIO Use Manual

For windows 95/98/nt4/2000
Table of Contents

Advertisement

152
you can have multiple
complex tag editor dialog boxes where a single attribute value may have to be filled
into multiple controls.
Special ATTRIB tag variable names
The following special variables can be used:
$$TAGBODY — This special tag attribute name is used when a control needs to be
populated by the body of a tag. An example of such a tag editor is the editor for the
HTML tag
control using the following
<ATTRIB NAME="$$TAGBODY" CONTROL="txtTextAreaContent"/>
$$TAGSTRING and $$WHOLETAGSTRING — These attributes can be used to populate
controls with the start-tag string or the whole tag including its start-tag, body and the
end-tag. This allows ActiveX controls to be passed the entire tag for custom processing
and specialized tag editor behavior.
$$EmbeddedCodeString — Represents just the text within a tag. It excludes the tag
name, delimiters, and white space outside the text block.

Generating a tag

The final stage in the process of building a tag editor is the definition of how a tag gets
generated from the date entered into the editor controls. The tag generation logic is
stored in the
the final tag string. The markup language used the
originally designed for wizards and was therefore called Wizard markup language
(WIZML). Because of this, all the tags in this section begin with the
See
"Building Custom Wizards" on page 173
get started is to have a look at the
located in the \Extensions\TagDefs\HTML directory.

Variables passed to the layout template

WIZML is described in a separate section though a few things should be noticed.
WIZML supports variables as well as functions. The value of each control of the tag
editor is passed to the template using a variable with the same name. Therefore, a
ColorPicker named colorBGColor will pass its value in colorBGColor variable. The
TAGLAYOUT
<TAGLAYOUT>
The above example shows a simple layout template for a hypothetical tag with a single
attribute
delimiters. If the user chose
template would generate the following tag:
<MYTAG COLOR="White">
ATTRIB
. The body of the
TEXTAREA
ATTRIB
block. This block contains a short template used to generate
TAGLAYOUT
template can then use this data to generate the tag string.
<MYTAG COLOR="$${colorBGColor}">
</TAGLAYOUT>
. Notice that in WIZML variables are embedded using the
COLOR
White
tags with the same
NAME
tag is filled into the txtTextAreaContent
TEXTAREA
tag.
for more info on WIZML. A good way to
sections of existing HTML tag editors
TAGLAYOUT
in the
colorBGColor
. This is common for more
template that was
TAGLAYOUT
WIZ
ColorPicker, the above
prefix.
$${}

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion studio 4.5

Table of Contents