A simple example of creating a new tag editor, Registering the tag in the tag library – Adobe Extending Dreamweaver CS4 User Manual
Page 214
208
EXTENDING DREAMWEAVER CS4
Tag libraries and editors
A simple example of creating a new tag editor
The examples in this section use
cfweather
, a hypothetical Adobe ColdFusion tag designed to extract the current
temperature from a weather database, to illustrate the steps necessary to create a new tag editor.
The attributes for the
cfweather
tag are described in the following table:
You create this new tag editor by registering the tag, creating a tag definition, creating a tag editor UI, and adding a tag
to the Tag Chooser.
Registering the tag in the tag library
For Dreamweaver to recognize the new tag, it must be identified in the TagLibraries.vtm file, which is located in the
Configuration/TagLibraries folder. However, the user could be on a multiuser platform such as Windows XP,
Windows 2000, Windows NT, and Mac OS X. If the user is on a multiuser platform, there is another TagLibraries.vtm
file in the user Configuration folder. This file is the one that must be updated because this file is the instance that
Dreamweaver searches for and parses.
The location of the user Configuration folder depends on the user platform.
For Windows 2000 and Windows XP platforms:
Dreamweaver CS4\Configuration
Note: It is possible that in Windows XP, this folder is inside a hidden folder.
For Mac OS X platforms:
Dreamweaver CS4:Configuration
Attribute
Description
Mandatory/Optional
element.name
Value appears as a List view item.
Mandatory
element.value
Value that is either placed directly into the code or a parameter that
passes into visual dialog boxes.
Mandatory
element.desc
Value is an HTML string and appears in the incorporated Reference
panel. If not specified, the
reference
attribute displays reference
content in the incorporated Reference panel.
Optional (
desc
and
reference
are mutually
exclusive)
element.reference
As many as three strings separated by commas that describe the
language, topic, and subtopic, respectively. This information appears in
the Reference panel. The first string is mandatory. The second string is
mandatory for the
element
tag only; optional for
category
and
tclibrary
tags. The third string is optional.
Optional (
desc
and
reference
are mutually
exclusive)
element.id
Any string that is different from the
element.id
attributes of other
elements in this file.
Optional
Attribute
Description
zip
A five-digit ZIP code
tempaturescale
The temperature scale (Celsius or Fahrenheit)