Server-side processing technologies such as ASP, PHP, ColdFusion, and JSP 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, ASP (Active Server Pages) files contain code for the server to interpret. This code is set off by a pair of delimiters: it begins with the string <%
and ends with the string %>
. Dreamweaver's Configuration/ThirdPartyTags folder contains a file named ASP.xml, which describes the format of ASP code and defines how Dreamweaver displays that code. Because of the way ASP code is specified in ASP.xml, Dreamweaver doesn't try to interpret anything between the starting and ending delimiters.
You can define your own tags and create tag database files to define how Dreamweaver reads and displays them. Creating tag database files is particularly useful if you're using a server-side markup system other than ASP, ColdFusion, or PHP; create a new tag database file for each such markup system, to tell Dreamweaver how to display the tags.
Note: This section explains how to define the appearance of a custom tag within Dreamweaver, but not how 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 "Property Inspectors" in Extending Dreamweaver.
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 file extension .xml.
If you are working on several different unrelated sites at once (for example, as a freelance developer), put all the tag specifications for a particular site in one file. Then simply 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 the HAPPY
tag:
<TAGSPEC TAG_NAME="happy" TAG_TYPE="nonempty" RENDER_CONTENTS="false" CONTENT_MODEL="marker_model" ICON="happy.gif" ICON_WIDTH="18" ICON_HEIGHT="18"></TAGSPEC>
There are two different kinds of tags defined using TAGSPEC
: normal HTML-style tags, and string-delimited tags, which start with one string and end with another string. String-delimited tags are like empty HTML tags (such as IMG
) in that they don't surround content and don't have closing tags. The HAPPY
tag shown above is a normal HTML-style tag; it starts with an opening <HAPPY>
tag, surrounds content, and ends with a closing </HAPPY>
tag. An ASP tag, which starts with the string <%
and ends with the string %>
, is a string-delimited tag.
The following table describes TAGSPEC
's attributes and their possible values:
Attribute | Value | Description |
---|---|---|
|
|
The name of the custom tag. Required. (For string-delimited tags, |
|
|
Determines whether the tag itself is the content (as with |
|
|
Determines whether the contents of the tag should appear in the document window, or whether the icon appears instead. Required for nonempty tags. Applies only to tags that appear outside of attributes. |
|
|
Describes both what content the tag can contain and what the tag can be contained by. Required.
Use
|
|
|
Specifies a delimiter that marks the beginning of a string-delimited tag. String-delimited tags can appear anywhere in the document where a comment can appear. Dreamweaver performs no tag parsing and no entity or URL decoding between |
|
|
Specifies a delimiter that marks the end of a string-delimited tag. Required if |
|
|
Indicates whether to ignore everything between |
|
|
Indicates whether to parse the attributes of the tag. If this is set to |
|
|
Specifies the path and file name of the icon associated with the tag. Required for empty tags, and for nonempty tags whose contents are not displayed in the Document window. |
|
|
Specifies the width of the icon. |
|
|
Specifies the height of the icon. |
* Ignored for tags that use START_STRING and END_STRING.