![]() |
VTML Tips and Techniques: Tag Chooser |
|
Once the site at the new server is ready, this message will automatically disappear!
Meanwhile, you can see how the move is progressing at the status page.
Home | VTML section | HTML section
|
||
Editor or |
When using the Tag Chooser to insert a tag, it can be hard to remember whether choosing a tag will just insert code into your page or will call up a tag editor dialog. It's happened more than once to me that I clicked a tag name several times thinking I didn't click hard enough, resulting in the tag being inserted more than once into my page, especially when the current cursor position happens to be obscured by the Tag Chooser dialog. Here's a little trick to make it easier to see the difference: The CAPTION attribute of the <E> tag in MarkUpTags.vtm contains what is shown in the list box on the right. It doesn't have to be just a tag name, as is the case in the file that comes with HomeSite. You can edit these so that you can see the difference between a tag that is inserted into your document directly and a tag that has a visual editor. I used the following strategy: tags that are inserted directly are shown as tag with angle brackets (<>), and if an end tag is written, that is shown as well. Tags for which there is a visual editor are still shown only by name. Since the captions in the right-hand list box are sorted alphabetically, the entries for directly inserted code will now be shown together as well, making it even easier to see the difference. |
|
|
Here's a small section from the MarkUpTags.vtm file that's included with my VTML Tag Definitions: <CAT CAPTION="Tag Editor Tags" ICON="Elements"> <E CAPTION="EDITORLAYOUT" VALUE='<EDITORLAYOUT' HELPFILE='Docs/VTMLTags/MKcontrol.html'> <E CAPTION="TAGDESCRIPTION" VALUE='<TAGDESCRIPTION' HELPFILE='Docs/VTMLTags/TAGDESCRIPTION.htm'> <E CAPTION="ATTRIB" VALUE='<ATTRIB' HELPFILE='Docs/VTMLTags/MKattributes.html'> <E CAPTION="CONTAINER" VALUE='<CONTAINER' HELPFILE='Docs/VTMLTags/MKcontrol.html'> <E CAPTION="CONTROL" VALUE='<CONTROL' HELPFILE='Docs/VTMLTags/MKcontrol.html'> <E CAPTION="ITEM" VALUE='<ITEM' HELPFILE='Docs/VTMLTags/MKcontrol.html'> <E CAPTION="TAG" VALUE='<TAG' HELPFILE='Docs/VTMLTags/MKtag.html'> <E CAPTION="TAGLAYOUT" VALUE='<TAGLAYOUT' HELPFILE='Docs/VTMLTags/MKtaglayout.html'> <E CAPTION="<ATTRIBUTES></ATTRIBUTES>" VALUE='<ATTRIBUTES></ATTRIBUTES>' HELPFILE='Docs/VTMLTags/MKattributes.html'> </CAT> |
Preselecting |
Here's one of the type "Wouldn't it be nice if..." where I tried something that seemed a reasonable approach - and... lo and behold it worked! So: would't it be nice if you could have the Tag Chooser call up a tag editor that contains a TabDialog with a particular tab preselected? Well, if the tab corresponds to an attribute, you can! Although the focus of this technique is the Tag Chooser (that's where we want something to happen),
the example involves not only MarkUpTags.vtm but also the EDITORLAYOUT and ATTRIBUTES section of the
tag editor you want to pre-select the tab of; so you'll have to jump to the
General section to read all about it.
|
|
Contributions! |
Do you have any VTML Tips or Techniques to share? If it's for the Tag Chooser section, use the following email link, otherwise go to the page corresponding to the section it's about and use the Contributions! mail link from there, so your mail will have the correct subject. Please explain why it's such a good tip, and illustrate with example code where appropriate. Also let me know whether you want you email address mentioned here, or only your name. Send your contribution to: The VTML Tips and Techniques sections are: |