Building a tag editor
205
See
../VTML_Reference/control.html
control
/a
and
../VTML_Reference/
container.html
container
/a
in the VTML Reference for syntax and usage
information.
Populating dialog boxes with tag data
Once the layout of controls is completed, you must define the way in which the tag
editor controls are populated when you are editing an existing tag. This is done in the
attributes
block of the main tag editor template.
The
attributes
block can contain
attrib
and
event
tags. The
attrib
tag defines
the way in which tag attribute values are inserted into the dialog controls, for
example:
<attributes>
<attrib name="value" control="txtName"/>
<attrib name="title" control="txtTitle"/>
<attrib name="title" control="txtTitle2"/>
<attrib name="alt" control="txtAltText"/>
<attrib name="align" control="dropAlign"/>
</attributes>
The
name
attribute of the
attrib
tag specifies the name of the attribute, while
control
specifies which control the value of that attribute should be assigned to. You
can have multiple
attrib
tags with the same name. This is common for more
complex tag editor dialog boxes where a single attribute value might 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
textarea
. The body of the
textarea
tag is filled into the
txtTextAreaContent
control using the following
attrib
code:
<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 to the entire tag
for custom processing and specialized tag editor behavior.
•
$$EmbeddedCodeString
This attribute 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 defining how a tag gets
generated from the data entered in the editor controls. The tag generation logic is
stored in the
taglayout
block. This block contains a short template used to generate
the final tag string.
Summary of Contents for HOMESITE
Page 11: ...Contents xi Table of CommandID values 310 Table of SettingID values 314 Glossary 323...
Page 12: ...xii Contents...
Page 20: ...xx About This Book...
Page 28: ...8 Chapter 1 Setting Up the Product...
Page 70: ...50 Chapter 4 Managing Files...
Page 88: ...68 Chapter 5 Writing Code and Web Content...
Page 116: ...96 Chapter 6 Editing Pages...
Page 148: ...128 Chapter 7 Using Web Development Languages...
Page 190: ...170 Chapter 11 Deploying Files...
Page 210: ...190 Chapter 12 Testing and Maintaining Web Pages...
Page 216: ...196 Chapter 13 Extending the Help System...
Page 350: ...330 Glossary...
Page 358: ...338 Index...