MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Manual page 212

Extending dreamweaver
Hide thumbs Also See for DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER:
Table of Contents

Advertisement

Creating a tag definition (VTML) file
When a user selects a registered tag using the Tag Chooser or a tag editor, Dreamweaver searches
for a corresponding VTML file for the tag definition.
To create a tag definition file:
In a text editor, create a file with the following contents:
1
<TAG NAME="cfweather" endtag="no">
<TAGFORMAT NLBEFORETAG="1" NLAFTERTAG="1"/>
<TAGDIALOG FILE="cfweather.htm"/>
<ATTRIBUTES>
</ATTRIBUTES>
</TAG>
Save the cfweather.vtm file in the Configuration/Taglibraries/CFML folder.
2
Using the tag definition file, Dreamweaver can perform code hinting, code completion, and
tag formatting functionality for the
Creating a tag editor UI
To create the cfweather tag editor user interface:
Save the cfweather.htm file in the Configuration/Taglibraries/CFML folder:
1
<!DOCTYPE HTML SYSTEM "-//Macromedia//DWExtension layout-engine 5.0//dialog">
<html>
<head>
<title>CFWEATHER</title>
<script src="../../Shared/Common/Scripts/dwscripts.js"></script>
<script src="../../Shared/Common/Scripts/ListControlClass.js"></script>
<script src="../../Shared/Common/Scripts/tagDialogsCmn.js"></script>
<script>
/************************* GLOBAL VARS **************************/
var TEMPATURESCALELIST;
initializeUI())
var theUIObjects;
/****************************************************************/
// inspectTag() API function defined (required by all tag editors)
function inspectTag(tagNodeObj)
{
// call into a common library version of inspectTagCommon defined
// in tagDialogCmns.js (note that it's been included)
// For more information about this function, look at the comments
// for inspectTagCommon in tagDialogCmn.js
tagDialog.inspectTagCommon(tagNodeObj, theUIObjects);
}
function applyTag(tagNodeObj)
{
// call into a common library version of applyTagCommon defined
212
Chapter 11: Tag Libraries and Editors
<ATTRIB NAME="zip" TYPE="TEXT"/>
<ATTRIB NAME="tempaturescale" TYPE="ENUMERATED">
<ATTRIBOPTION VALUE="Celsius"/>
<ATTRIBOPTION VALUE="Fahrenheit"/>
</ATTRIB>
// tempaurelist control (initialized in
// array of UI objects used by common API functions
tag.
cfweather

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents