Adobe 38040334 - Dreamweaver CS3 User Manual page 287

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

Advertisement

<group serverBehavior="test.htm">
<title>Test</title>
<groupParticipants>
<groupParticipant name="test_p1" partType="identifier" />
<groupParticipant name="test_p2" partType="identifier" />
</groupParticipants>
</group>
The following example inserts two simple participants above the
<% //test_p1 %>
<% //test_p2 %>
<html>
These participants are found and matched, and Test appears once in the Server Behaviors panel. If you add the server
behavior again, nothing is added because the participants already exist.
If the participants have unique parameters, multiple instances can be inserted above the
adding a name parameter to the participant, a user can enter a unique name in the Test Server Behavior dialog box.
If the user enters the name aaa, the following participants are inserted:
<% //test_p1 name="aaa" %>
<% //test_p2 name="aaa" %>
<html>
If you add the server behavior again with a different name, such as bbb, the document now looks like the following
example:
<% //test_p1 name="aaa" %>
<% //test_p2 name="aaa" %>
<% //test_p1 name="bbb" %>
<% //test_p2 name="bbb" %>
<html>
There are two instances of Test listed in the Server Behaviors panel. If the user tries to add a third instance to the
page and names it aaa, nothing is added because it already exists.
Within the
tag, matching can also use position information. In the following example, there are two partici-
html
pants, one that is added before the selection and another that is added after the selection:
<% if (expression) { //mySBName %>
Random HTML selection here:
<% } //end mySBName %>
These two participants are without parameters, so they are grouped together. However, you can add another instance
of this server behavior elsewhere in the HTML, as shown in the following example:
<% if (expression) { //mySBName %>
Random HTML selection here:
<% } //end mySBName %>
More HTML here:
<% if (expression) { //mySBName %>
Another HTML selection here:
<% } //end mySBName %>
tag:
html
html
DREAMWEAVER CS3
Extending Dreamweaver
tag. For example, by
281

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents