Customizing the interpretation of third-party tags – Adobe Extending Dreamweaver CS4 User Manual
Page 12
6
EXTENDING DREAMWEAVER CS4
Customizing Dreamweaver
2
Open Extensions.txt in a text editor.
3
Add a new line for each new file type. In capital letters, enter the filename extensions that the new file type can have,
separated by commas. Then add a colon and a brief description to show in the pop-up menu for file types that
appear in the File > Open dialog box.
For example, for JPEG files, enter the following:
JPG,JPEG,JFIF:JPEG Image Files
4
Save the file.
5
Restart Dreamweaver.
To see the changes, select File > Open, and click the pop-up menu of file types.
Customizing the interpretation of third-party tags
Server-side technologies such as ASP, Adobe ColdFusion, JSP, and PHP use special non-HTML code in HTML files;
servers create and serve HTML content based on that code. When Dreamweaver encounters non-HTML tags, it
compares them with information in its third-party tag files, which define how Dreamweaver reads and displays non-
HTML tags.
For example, in addition to regular HTML, ASP files contain ASP code for the server to interpret. ASP code looks
almost like an HTML tag, but is marked by a pair of delimiters: it begins with
<%
and ends with
%>
. The Dreamweaver
Configuration/ThirdPartyTags folder contains a file named Tags.xml, which describes the format of various third-
party tags, including ASP code, and defines how Dreamweaver displays that code. Because of the way ASP code is
specified in Tags.xml, Dreamweaver does not try to interpret anything between the delimiters; instead, in Design view,
it displays an icon that indicates ASP code. Your own tag database files can define how Dreamweaver reads and
displays your tags. Create a new tag database file for each set of tags, to tell Dreamweaver how to display the tags.
Note: This section explains how to define the way Dreamweaver displays a custom tag, but doesn’t describe how to
provide a way to edit the content or properties of a custom tag. For information on how to create a Property inspector to
inspect and change the properties of a custom tag, see “
Each tag database file defines the name, type, content model, rendering scheme, and icon for one or more custom tags.
You can create any number of tag database files, but all of them must reside in the Configuration/ThirdPartyTags
folder to be read and processed by Dreamweaver. Tag database files have the .xml file extension.
If you are working on several unrelated sites at once (for example, as a freelance developer), you can put all the tag
specifications for a particular site in one file. Then, include that tag database file with the custom icons and Property
inspectors that you hand over to the people who will maintain the site.
You define a tag specification with an XML tag called
tagspec
. For example, the following code describes the
specification for a tag named
happy
:
"marker_model" icon="happy.gif" icon_width="18" icon_height="18">
You can define two kinds of tags using
tagspec
:
•
Normal HTML-style tags
The
happy
tag example is a normal HTML-style tag. It starts with an opening
tag, contains data between
opening and closing tags, and ends with a closing
tag.
•
String-delimited tags