User Guide

270 Chapter 15: Server Behaviors
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. Parameters 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:
<insertText location="aboveHTML">
<![CDATA[<%= @@recordset@@).cursorType %>]]>
</insertText>
When the text is inserted, the @@recordset@@ parameter is replaced by a recordset name that the
user supplies. For more information on conditional and repeating code blocks, see the “Adding
Custom Server Behaviors” chapter in Getting Started with Dreamweaver.
<insertText> 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 273).
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:
<insert location="aboveHTML+60">
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:
<insert location="aboveHTML">
The belowHTML[+weight] value is similar to the aboveHTML location, except that participants
are added below the closing
/HTML tag.