206
Chapter 14 Customizing the Development Environment
A good way to get started is to have a look at the taglayout sections of existing HTML
tag editors located in the \Extensions\TagDefs\HTML directory.
See
../VTML_Reference/taglayout.html
taglaout
/a
in the VTML Reference for syntax
and usage information.
Variables passed to the layout template
The value of each control of the tag editor is passed to the template using a variable
with the same name, for example, a ColorPicker control named
colorBGColor
will
pass its value in a
colorBGColor
variable. The
taglayout
template can then use this
data to generate the tag string.
<taglayout>
<mytag color="$${colorBGColor}">
</taglayout>
This example shows a basic layout template for a hypothetical tag with a single
attribute,
color
. Notice that variables are embedded using the $${} delimiters. If the
user selects White in the
colorBGColor
ColorPicker control, the template generates
this tag:
<mytag color="White">
Special variables
In addition to the control variables, a few other parameters get sent to the
taglayout
template:
•
OPTIONLowerCaseTags
Returns true or false. Specifies whether the tag
should be generated using lowercase.
•
EDITORTagIndentString
Maintains indentation for tag attributes and body.
•
OPTIONLinearLayout
Returns true or false. Specifies whether the tag should
be generated with its attributes in a single line or not.
•
TAGDATAUnknownAttributes
Returns a string containing all attributes that
were contained in the edited tag string but are not recognized by the editor.
Using OPTIONLowerCaseTags
You can use this parameter to create a layout template, which generates a tag in
lowercase or uppercase, based on user preferences. Here is a version of the mytag
layout template responding to case preferences:
<taglayout>
<WIZIF OPTIONLowerCaseTags EQ 'true'>
<mytag color="$${colorBGColor}">
<WIZELSE>
<mytag COLOR="$${colorBGColor}">
</WIZIF>
</taglayout>
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...