Creating the EDML file
The EDML file defines the code that Adobe Dreamweaver inserts into the document to represent the data source value. (For more information about EDML files, see Server Behaviors). When a user adds a particular value from a data source to a document, Adobe Dreamweaver inserts the code that will translate into the actual value at runtime. The participant EDML file defines the code for the document (for more information, see Participant EDML files).
For the MyDatasource Variable, you want Adobe Dreamweaver to insert the ColdFusion code <cfoutput>#MyXML.variable#</cfoutput> where variable is the value the user wants from the data source.
To create the EDML file:
- Create a new blank file.
- Enter the following:
<participant> <quickSearch><![CDATA[#]]></quickSearch> <insertText location="replaceSelection"><![CDATA[<cfoutput>#MyDatasource.@@bindingName@@#</cfoutput>]]></insertText> <searchPatterns whereToSearch="tag+cfoutput"> <searchPattern paramNames="sourceName,bindingName"><![CDATA[/#(?:\s*\w+\s*\()?(MyDatasource)\.(\w+)\b[^#]*#/i]]></searchPattern> </searchPatterns> </participant>
- Save the file as MyDatasource_DataRef.edml in the Configuration/DataSources/ColdFusion folder.