When you use the Server Behavior Builder to create a Dreamweaver-specific extension, Dreamweaver creates several files (EDML and HTML script files) that support inserting the server behavior code into a Dreamweaver document (some behaviors also reference JavaScript files for additional functionality). The architecture simplifies your implementation of the API and also separates your runtime code from how Dreamweaver deploys it. This topic discusses ways of modifying these files.

Server behavior folders and files

The user interface (UI) for each server behavior resides in the Configuration/ServerBehaviors/ServerModelName folder, where ServerModelName is one of the following server types: ASP_Js (JavaScript), ASP_Vbs (VBScript), ColdFusion, PHP_MySQL, or Shared (cross-server model implementations).

Extension Data Markup Language

Dreamweaver generates two EDML files when you use the Server Behavior Builder: a group EDML file and a participant EDML file corresponding to the names that you provide in the Server Behavior Builder. The group file defines the relevant participants, which represent code blocks, and the groups define which participants are combined to make an individual server behavior.

Group files

Group files contain a list of participants, and participant files have all server-model-specific code data. Participant files can be used by more than one extension, so several group files can refer to the same participant file.

The following example shows a high-level view of the Server Behavior Group EDML file. For a complete list of elements and attributes, see Group EDML file tags.

 <group serverBehavior="Go To Detail Page.htm" dataSource="Recordset.htm"> 
    <groupParticipants selectParticipant="goToDetailPage_attr"> 
        <groupParticipant name="moveTo_declareParam"0partType="member"/> 
        <groupParticipant name="moveTo_keepParams"0partType="member"/> 
        <groupParticipant name="goToDetailPage_attr" partType="identifier" /> 

In the groupParticipants block tag, each groupParticipant tag indicates the EDML participant file that contains the code block to use. The value of the name attribute is the participant file name minus the .edml extension (for example, the moveTo_declareParam attribute).

Participant files

A participant represents a single code block on the page, such as a server tag, an HTML tag, or an attribute. A participant file must be listed in a group file to be available to a Dreamweaver document author. Several group files can use a single participant file.

For example, the moveTo_declareParam.edml file contains the following code:

    <insertText location="aboveHTML+80"> 
<% var MM_paramName = ""; %> 
    <searchPatterns whereToSearch="directive"> 

When Dreamweaver adds a server behavior to a document, it needs to have detailed information, including where to insert the code, what the code looks like, and what parameters the Dreamweaver author or data replaced at runtime. Each participant EDML file describes these details for each block of code. Specifically, the participant file describes the following data:

  • The code and where to put the unique instance are defined by the insertText tag parameters, as shown in the following example:

     <insertText location="aboveHTML+80">
  • How to recognize instances already on the page are defined by the searchPatterns tag, as shown in the following example:

     <searchPatterns whereToSearch="directive"> <searchPattern><![CDATA[/var\s*MM_paramName/]]></searchPattern> </searchPatterns>

    In the searchPatterns block tag, each searchPattern tag contains a pattern that finds instances of runtime code and extracts specific parameters. For more details, see Server behavior techniques.

The script file

Each server behavior also has an HTML file that contains functions and links to the scripts that manage the integration of the server behavior code with the Dreamweaver interface. The functions that are available for editing in this file are discussed in Server behavior implementation functions.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy