Adding custom server behaviors – Adobe Dreamweaver CC 2014 v.13 User Manual
Page 547
Adding custom server behaviors
About custom server behaviors
Custom server behaviors workflow
Use the Server Behavior Builder
Creating code blocks
Positioning a code block
Repeating code blocks with the loop directive
Request a parameter for the server behavior
Edit and modify server behaviors
Coding guidelines
Testing server behaviors
Note: The user interface has been simplified in Dreamweaver CC and later. As a result, you may not find some of the options described in this
article in Dreamweaver CC and later. For more information, see
.
About custom server behaviors
Dreamweaver comes with a set of built-in server behaviors that lets you easily add dynamic capabilities to a site. You can extend the
Dreamweaver functionality by creating server behaviors to suit your development needs, or by obtaining server behaviors from the Dreamweaver
Exchange website.
Before creating your own server behaviors, you should check the Dreamweaver Exchange website to see if another party has already created a
server behavior that supplies the functionality you’d like to add to your website. Often, a third-party developer has created and tested a server
behavior that will address your needs.
Access Dreamweaver Exchange
1. In Dreamweaver, access Dreamweaver Exchange in one of these ways:
Select Help > Dreamweaver Exchange.
Select Window > Server Behaviors, click the Plus (+) button, and select Get More Server Behaviors.
The Dreamweaver Exchange web page opens in your browser.
2. Log on to the Exchange using your Adobe ID, or, if you have not yet created a Dreamweaver Exchange ID for yourself, follow the
instructions to open an Adobe account.
Install a server behavior or other extension in Dreamweaver
1. Start the Extension Manager by selecting Commands > Manage Extensions.
2. Select File > Install Package in the Extension Manager.
For more information, see Using the Extension Manager.
Custom server behaviors workflow
If you are a web developer proficient in ColdFusion, JavaScript, VBScript, or PHP, you can write your own server behaviors. The steps to create a
server behavior include the following tasks:
Write one or more code blocks that perform the required action.
Specify where the code block should be inserted within the page’s HTML code.
If the server behavior requires that a value be specified for a parameter, create a dialog box that prompts the web developer applying the
behavior to supply an appropriate value.
Test the server behavior before making it available to others.
Use the Server Behavior Builder
Use the Server Behavior Builder to add the code block or blocks that the behavior inserts into a page.
1. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, and select New Server Behavior.
540