Adobe 38040334 - Dreamweaver CS3 User Manual page 290

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

Advertisement

The search patterns fail because they are looking for a parenthesis after the
patterns more forgiving, you can shorten them by splitting them up, as shown in the following example:
<quickSearch>Response.Write</quickSearch>
<searchPatterns whereToSearch="directive">
<searchPattern paramNames="rs">/(\w+)\.EOF/</searchPattern>
<searchPattern paramNames="new__url">
/if\s*\([^\r\n]*\)\s*Response\.Redirect\("([^\r\n]*)"/i
</searchPattern>
</searchPatterns>
These shortened search patterns are flexible, so the user can add to the code. However, if the server behavior changes
the URL, when the user clicks OK, the participant is replaced, and the customizations are lost. To update more
precisely, add an
updatePatterns
<updatePatterns>
<updatePattern paramNames="rs">/(\b)\w+(\.EOF)/\</updatePattern>
<updatePattern paramNames="new__url">
/(Response\.Redirect\(")[^\r\n]*(")/i
</updatePattern>
</updatePatterns>
In update patterns, the parentheses are reversed and are placed around the text before and after the parameter. For
search patterns, use the
textBeforeParam(param)textAfterParam
(textBeforeParam)param(textAfterParam)
sions is replaced with the new value for the parameter.
Deleting server behaviors
Default deletion and dependency counts
panel by clicking the Minus (-) button or pressing Delete. All the participants are removed except for the ones that
are shared by other server behaviors. Specifically, if more than one server behavior has a participant pointer to the
same node, the node is not deleted.
By default, participants are deleted by removing an entire tag. If the insert location is
outer tag is removed. For attributes, the entire attribute declaration is removed. The following example shows an
attribute participant on the
<form action="<% my_participant %>">
After deleting the attribute, only
Using delete flags to limit participant deletion
ipants are deleted. This can be achieved by adding a delete tag to the EDML file. The following example shows a
participant that is an
href
<a href="<%=MY_URL%>">Link Text</a>
When this attribute participant is deleted, the resulting tag is
in Dreamweaver. It might be preferable to delete only the attribute value, which is done by adding the following tag
to the participant EDML file:
<delete deleteType="innerOnly"/>
Another approach is to remove the entire tag when the attribute is deleted by typing
deleteType="tagOnly"/>
tag that contains a pattern for updating each parameter:
parameter. All the text between the two parenthetical subexpres-
The user can delete an instance that is selected in the Server Behaviors
attribute of a
ACTION
form
remains.
form
There might be cases where you want to limit the way that partic-
attribute of a link:
. The resulting text is Link Text.
parameter. To make the search
EOF
parameter. For update patterns, use the
tag:
, which no longer appears as a link
<a>Link Text</a>
DREAMWEAVER CS3
Extending Dreamweaver
, only the
"wrapSelection"
<delete
284

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents