Macromedia dreamweaver 8-using dreamweaver User Manual

Page of 1030
780
Chapter 38:  Adding Custom Server Behaviors
Code block positioning within web pages
When you create code blocks using the Server Behavior Builder (see 
 for more information), you must specify where to insert them in the page’s 
HTML code. You do this using the Server Behavior Builder dialog box’s Insert Code and 
Relative Position pop-up menus, which let you select where to insert the code block within 
the document, and then specify a position relative to another tag in the page.
For example, if you insert a code block above the opening 
<html>
 tag, you must then specify 
the code blocks 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, then the positioning options available in the Relative Position pop-up menu reflect 
choices relevant for that part of the page. 
The code block insert options, and the relative positioning options available for each, are 
shown in the table below.
 
Insert Code options
Relative position options
Above the <html> Tag
• At the beginning of the file
• Just before the recordsets
• Just after the recordsets
• Just above the 
<html>
 tag
• Custom position
Below the </html> Tag
• Before the end of the file
• Before the recordset close
• After the recordset close
• After the 
</html>
 
tag
• Custom position
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