Server Behavior Techniques - Adobe 38040334 - Dreamweaver CS3 User Manual

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Values
The
value is a valid tag name; it should match a translation
tagName
Example
If you specify the value
<closeTag>MM_DYNAMIC_CONTENT</closeTag>
with the
</MM_DYNAMIC_CONTENT>

Server behavior techniques

This section covers the common and advanced techniques that create and edit server behaviors. Most of the sugges-
tions involve specific settings in the EDML files.
Finding server behaviors
Writing search patterns
to find each instance in a document. This requires a
is contained within the
searchPatterns
The
tag should be a string, not a regular expression, that indicates that the server behavior might exist
quickSearch
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>Response.Redirect</quickSearch>
For performance reasons, the
instances. If this string is found in the document and the participant identifies a server behavior (in the group file,
partType="identifier"
function is called. If your participant has no reliable strings for which to search (or for debugging
haviors()
purposes), you can leave the
<quickSearch></quickSearch>
In this example, the server behavior is always loaded and can search the document.
Next, the
searchPattern
parameter values from the participant code. The search patterns specify where to search (the
attribute) with a series of
searchPattern
or regular expressions. The previous example code is an ASP directive, so the
fication and a regular expression identify the directive and extract the parameters, as shown in the following
example:
<quickSearch>Response.Write</quickSearch>
<searchPatterns whereToSearch="directive">
<searchPattern paramNames="rs,new__url">
/if\s*\((\w+)\.EOF\)\s*Response\.Redirect\("([^\r\n]*)"\)/i
</searchPattern>
</searchPatterns>
tag.
In order to update or delete server behaviors, you must provide a way for Dreamweaver
quickSearch
tag.
string checks for that tag:
quickSearch
pattern is the beginning of the process of finding server behavior
quickSearch
for this participant), the related server behavior files are loaded and the
string empty, as shown in the following example:
quickSearch
tag searches the document more precisely than the
tags that contain specific patterns. These patterns can use simple strings
tag.
openTag
, the dynamic data is translated to end
tag and at least one
searchPattern
tag and extracts
quickSearch
whereToSearch
whereToSearch="directive"
DREAMWEAVER CS3
279
Extending Dreamweaver
tag, which
findServerBe-
speci-

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents