When you create code blocks using the Server Behavior Builder, you must specify where to insert them in the page’s HTML code.
For example, if you insert a code block above the opening <html> tag, you must then specify the code block’s position relative to other tags, scripts, and server behaviors in that section of the page’s HTML code. Typical examples include positioning a behavior either before or after any recordset queries that might also exist in the page code above the opening <html> tag.
When you select a positioning option from the Insert Code pop‑up menu, the options available in the Relative Position pop‑up menu change to provide relevant options for that part of the page. For example, if you select Above The <html> Tag In The Insert Code pop‑up menu, the positioning options available in the Relative Position pop‑up menu reflect choices relevant for that part of the page.
The following table shows the code block insert options, and the relative positioning options available for each:
Insert Code options |
Relative position options |
---|---|
Above the <html> Tag |
|
Below the </html> Tag |
|
Relative to a Specific Tag |
Select a tag from the Tag pop‑up menu, and then choose from the tag positioning options. |
Relative to the Selection |
Before the selection After the selection Replace the selection Wrap the selection |
To specify a custom position, you must assign a weight to the code block. Use the Custom Position option when you need to insert more than one code block in a particular order. For example, to insert an ordered series of three code blocks after the code blocks that open recordsets, you would enter a weight of 60 for the first block, 65 for the second, and 70 for the third.
By default, Dreamweaver assigns a weight of 50 to all recordset-opening code blocks inserted above the <html> tag. If the weight of two or more blocks match, Dreamweaver randomly sets the order among the blocks.