User Guide
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.htmltaglaout/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>