The TAG tag is the outermost tag for VTML tag definitions, similar to HTML for HTML documents or WIZARD for Wizard definition profiles: it encloses the entire document. It is required for a Tag Definition file.
The TAG tag is the outermost tag for VTML tag definitions.
The TAG tag is the outermost tag of a Tag Definition, as the WIZARD tag is for a Wizard profile and the HTML tag is for an HTML page.
It can take two attributes. As with the WIZARD tag, the NAME attribute is only a comment. BODYEDITING determines whether any text between start and end tags is editable with the tag editor.
<TAG .../> | |
---|---|
NAME | Name of the tag. Not required but recommended for readability and maintenance. Even when this attribute is not specified, the tag name will appear in the title bar of the editor window. |
BODYEDITING | FLAG. Determines whether any text between start and end tags is editable with the tag editor. |
If editing of the tag body is allowed (BODYEDITING specified), include an ATTRIB tag with the special $$TagBody attribute in the ATTRIBUTES section and a <TAGLAYOUT SECTION="TagBody"> section.
The following editor for a sample tag called ADDRESSXMP shows how bodyediting works. The relevant syntax is in bold:
<TAG NAME="ADDRESSXmp" BODYEDITING> <EDITORLAYOUT HEIGHT=150 WIDTH=400> <CONTAINER TYPE="Panel" NAME="Panel" CAPTION=" Content " HEIGHT="MAXIMUM" WIDTH="MAXIMUM" MAXWIDTHPADDING=10 MAXHEIGHTPADDING=10 RIGHT=10/> <CONTROL TYPE="TextArea" NAME="txtContent" HEIGHT="MAXIMUM" WIDTH="MAXIMUM" MAXWIDTHPADDING=10 MAXHEIGHTPADDING=10 DOWN=15 RIGHT=10 HORIZRESIZE="BODY" VERTRESIZE="BODY"/> </CONTAINER> </EDITORLAYOUT> <ATTRIBUTES> <ATTRIB NAME="$$TagBody" CONTROL="txtContent"/> </ATTRIBUTES> <TAGLAYOUT> <WIZSET TagName=DefaultCase('ADDRESSXmp')> <WIZIF OPTIONLinearLayout EQ 'true'> <WIZSET SpacingGap=' '> <WIZELSE> <WIZSET SpacingGap=Chr(13) & Chr(10) & ' '> </WIZIF> <WIZIF 1><$$TAGNAME</WIZIF> <WIZIF TAGDATAUnknownAttributes NEQ ''>$$SpacingGap$$TAGDATAUnknownAttributes</WIZIF>> </TAGLAYOUT> <TAGLAYOUT SECTION="TagBody"> $$txtContent </TAGLAYOUT> <TAGLAYOUT SECTION="EndTag"></$$TagName></TAGLAYOUT> </TAG>
The screen shot shows editing an existing tag. Because of the BODYEDITING attribute, the whole tag gets selected and the content between the start and end tags is read into the txtContent control by the $$TagBody attribute linked to this control in the <ATTRIBUTES> section.
Note: BodyEditing will only work when the user is editing a container tag and then only if the end tag is actually present, even if the end tag is optional.
Note: Although the TAGLAYOUT tag now has an option to prevent white space from being lost between sections, it seems BODYEDITING still causes white space between the start tag and the tag body to be lost when reading an existing tag. When the tag is re-written, the body starts right after the start tag, on the same line, even if the TAGLAYOUT sections all have TRIMWHITESPACE="No" is specified. Currently there is no reliable workaround for this.
A Tag Definition file can contain several sections which are summarized in the table below. The section names in the summary table link to the corresponding reference documents.
Section | Description |
---|---|
EDITORLAYOUT | Defines the structure in which containers and controls can be laid out for the Tag Editor user interface. |
ATTRIBUTES | This is probably the most important section in a Tag Definition file because its contents determine part or all of the behavior of four different VTML-driven tools: Tag Editors, Tag Inspector, Tag Insight and Tag Tips. |
ATTRIBCATEGORIES | The ATTRIBCATEGORIES section provides a mechanism to arrange attributes in logical groups which can be displayed in Tag Inspector when the user chooses the Categorized option. |
TAGLAYOUT | A Tag Editor must have at least one TAGLAYOUT section. The default section is StartTag. There can be up to three TAGLAYOUT sections, each of a different type. |
TAGDESCRIPTION | This section is used to add HTML help to specific tag dialogs. This help can either take the form of embedded text with markup or a reference to an external file. |