User Guide
286 Chapter 15: Server Behaviors
<closeTag>
Description
This optional tag should be inserted at the end of the translated section. This tag enables certain
other extensions, such as custom Property inspectors, to find the translation.
Parent
translation
Type
Block tag.
Required
No.
Values
The tagName value is a valid tag name; it should match a translation openTag tag.
Example
If you specify the value <closeTag>MM_DYNAMIC_CONTENT</closeTag>, the dynamic data is
translated to end with the
</MM_DYNAMIC_CONTENT> tag.
Server behavior techniques
This section covers the common and advanced techniques that create and edit server behaviors.
Most of the suggestions involve specific settings in the EDML files.
Finding server behaviors
Writing search patterns In order to update or delete server behaviors, you must provide a way
for Dreamweaver to find each instance in a document. This requires a
quickSearch tag and at
least one
searchPattern tag, which is contained within the searchPatterns tag.
The
quickSearch tag should be a string, not a regular expression, that indicates that the server
behavior might exist on the page. It is not case-sensitive. It should be short and unique, and it
should avoid spaces and other sections that can be changed by the user. The following example
shows a participant that consists of the simple ASP JavaScript tag:
<% if (Recordset1.EOF) Response.Redirect("some_url_here") %>
In the following example, the quickSearch string checks for that tag:
<quickSearch>Response.Redirect</quickSearch>
For performance reasons, the quickSearch pattern is the beginning of the process of finding
server behavior instances. If this string is found in the document and the participant identifies a
server behavior (in the group file,
partType="identifier" for this participant), the related
server behavior files are loaded and the
findServerBehaviors() function is called. If your
participant has no reliable strings for which to search (or for debugging purposes), you can leave
the
quickSearch string empty, as shown in the following example:
<quickSearch></quickSearch>
In this example, the server behavior is always loaded and can search the document.