beautypg.com

Inserttext> attributes, Location – Adobe Extending Dreamweaver CS4 User Manual

Page 273

background image

267

EXTENDING DREAMWEAVER CS4

Server behaviors

Required
No.

Value
The value is the text to insert in the document. If any parts of the text need customizing, they can be passed in later as
parameters. Arguments should be embedded within two at (

@@

) signs. Because this text can interfere with the EDML

structure, it should use the

CDATA

construct, as shown in the following example:

When the text is inserted, the

@@recordset@@

argument is replaced by a recordset name that the user supplies. For

more information on conditional and repeating code blocks, see “Adding Custom Server Behaviors” in Getting Started
with Dreamweaver
.

attributes

The following items are valid attributes of the

insertText

tag.

location

Description
This attribute specifies where the participant text should be inserted. The insert location is related to the

whereToSearch

attribute of the

searchPatterns

tag, so be sure to set both carefully (see

whereToSearch

” on

page 269).

Parent

insertText

Type
Attribute.

Required
Yes.

Values
aboveHTML

[+weight]

, belowHTML

[+weight]

, beforeSelection, replaceSelection, wrapSelection, afterSelection,

beforeNode, replaceNode, afterNode, firstChildOfNode, lastChildOfNode, nodeAttribute[+attribute]

The aboveHTML

[+weight]

value inserts the text above the

HTML

tag (suitable only for server code). The weight

can be an integer from

1

to

99

and is used to preserve relative order among different participants. By convention,

recordsets have a weight of

50

, so if a participant refers to recordset variables, it needs a heavier weight, such as

60

,

so the code is inserted below the recordset, as shown in the following example:

If no weight is provided, it is internally assigned a weight of

100

and is added below all specifically weighted

participants, as shown in the following example:

This manual is related to the following products: