Editing and modifying server behaviors

Editing and modifying server behaviors

You can edit any server behavior created with the Server Behavior Builder, including server behaviors you download from the Macromedia Exchange website, and other third-party developers.

If you apply a server behavior to a page and then edit the behavior in Dreamweaver, instances of the old behavior will no longer appear in the Server Behaviors panel. The Server Behaviors panel searches the page for code that matches the code of known server behaviors. If the code of a server behavior known to the panel changes, the panel will no longer recognize earlier versions of the behavior on that page.

If you want both the old and new versions of the behavior to appear in the panel:

  • Click the Plus (+) button on the Server Behaviors panel (Window > Server Behaviors), select New Server Behavior, and create a copy of the old server behavior.

To edit the code of a server behavior created with the Server Behavior Builder:

  1. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Edit Server Behaviors from the pop-up menu.

    The Edit Server Behaviors dialog box appears, displaying all the behaviors for the current server technology.

    This is a picture of the feature being described.

  2. Select the server behavior and click Edit.

    The Server Behavior Builder dialog box appears.

    This is a picture of the feature being described.

  3. Select the appropriate code block and modify the code to be inserted in pages.
  4. (Optional) You can change or add parameter markers to the code.

    For instructions, see Creating a dialog box for a custom server behavior.

  5. (Optional) If you want, change where the code block is inserted in the page’s HTML code by choosing another option in the Insert Code pop-up menu.

    For instructions, see Positioning code blocks.

  6. If the modified code does not contain any designer-supplied parameters, click OK.

    Dreamweaver regenerates the server behavior without a dialog box. The new server behavior appears in the Plus (+) pop-up menu of the Server Behaviors panel.

  7. If the modified code does contain designer-supplied parameters, click Next.

    Dreamweaver asks you whether you want to create a new dialog box, overwriting the old one. Make your changes and click OK.

Dreamweaver saves all changes in the server behavior’s EDML file.



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Defining Sources of Dynamic Content
Developing Applications Rapidly