One
of ColdFusion Studio's most powerful help features are its tag editors. These
are the little dialog boxes that pop up when you right-click on a tag and select
Edit Tag (or press Ctrl-F4). An example of a tag editor is shown in Figure 1.
Figure 1: Tag Editors are one of the most powerful ways to get help in Studio
and HomeSite.
The beauty of tag editors is that they are not hard-coded into the product; rather,
they are created on the fly. When a tag editor is to be displayed, its definition
is read from a special file, and Studio uses that information to create the dialog.
Those special files can be edited (or created) as needed.
Installing Tag Editors
If you've ever downloaded a tag from the Developer's Exchange (at http://devex.allaire.com/developer/gallery)
it may have come with a file with a VTM extension. That file is the tag editor
definition file, and it is installed simply by placing it beneath the TagDefs
directory (for ColdFusion Studio 4.5, this is usually C:Program FilesAllaireColdFusion
Studio 4.5ExtensionsTagDefs). When ColdFusion Studio needs to display a Tag Editor,
it automatically scans that directory tree to find the appropriate VTM file.
How are VTM files associated with tags? By their names. The VTM for the HTML <--TABLE-->
tag is TABLE.VTM, and the VTM for the CFML <--CFQUERY--> tag is CFQUERY.VTM. (If
you've ever right-clicked on a tag in ColdFusion Studio only to find the Edit
Tag option grayed out, it is because no matching VTM file was found).
ColdFusion Studio comes with VTM files for all of the standard HTML, CFML, and
even WML tags. But if you write your own tags or download third-party tags, ColdFusion
Studio won't be able to display a tag editor unless a matching VTM file has been
created and installed.
Understanding VTML
VTM files are created using a special XML-based language called VTML (for Visual
Tool Markup Language). Before you groan at having to learn yet another language,
let me assure you that this one is easy to learn; if you can handle HTML and CFML,
you'll manage VTML just fine.
So, what exactly is VTML? Well, what HTML does for browser display and CFML
does for server-side processing, VTML does for dialogs and visual tools. VTML
is a tag-based language that is used to define and create visual tool elements.
These elements include dialogs, fields, help text, file browser and color selectors,
and more.
Click
Here to Read the Full Article
About the Author:
Ben Forta is Allaire Corporation's product evangelist for the ColdFusion product
line. Ben has over 15 years of experience in the computer industry and spent 6
years as part of the development team responsible for creating ONTime, one of
the most successful calendar and group scheduling products, with over one million
users worldwide. Ben is the author of the popular The ColdFusion 4.0 Web Application
Construction Kit (now in its third edition) and the more recent Advanced
ColdFusion 4.0 Application Development (both published by Que). Ben welcomes
your email at ben@forta.com and invites you
to visit his own ColdFusion Web site at http://www.forta.com/cf
|