Documentation Center

Creating Dreamweaver Templates for Outbound E-mail

A Dreamweaver Template for Outbound E-mail defines the look and feel of the content of a Mailing.

Before you begin

  • To create a Dreamweaver Template you must have Template Management rights as well as write permissions for the Folder in which you intend to create the Compound Template.

About this task

In a Compound Template, a Dreamweaver Template Building Block receives a package from the previous Template Building Block in the Compound Template sequence and defines the look and feel of the content it receives turning it into visualized content. As some e-mail recipients do not have access to an e-mail client that can handle HTML-formatted e-mail (as defined in Contact details), you need to define both a plain-text and HTML version of a Dreamweaver Template to add to your Compound Page Template to define the look & feel of respectively your plain-text e-mails and HTML e-mails. When you add these Dreamweaver Templates to the Compound Page Template, the rendered Page will contain information about both visualizations.

Procedure

  1. Open Content Manager Explorer.
  2. Open a Publication.
  3. Select the Folder where your templates are stored and choose New > Template Building Block in the context menu.
    The New Template Building Block window appears.
  4. In the General tab, enter a Name.
  5. In the Source tab, select the Template Type Dreamweaver.
  6. Add a repeating region to process the Components and Fields in the Component Presentations on a Page. For example:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <body>
    <p>This is an example of an Outbound Email Template.</p>
    <!-- TemplateBeginRepeat name="Components" --> 
    	<!-- TemplateBeginRepeat name="Fields" -->
    		<p>@@textField@@</p>
    	<!-- TemplateEndRepeat -->
    <!-- TemplateEndRepeat -->
    </body>
    </html>

    The name of the repeating region is an expression which refers to a Component array used in the package. The array of Components may contain further arrays itself, for example an array containing the fields of the Component. To iterate over those fields, create a repeating region within the newly created repeating region and call it Fields.

    In the repeating region in the example, the @@textField@@ in the name of a field in the Component.

  7. Add Merge Fields to personalize the Mailing, for example:
    <p>Hello [* Name *],</p>
  8. Track whether a Contact opens a Mailing, for example:
    @@OutboundEmail_OpenTracking@@
  9. Specify links to track, for example:
    <a href="@@GetLinkTrackingURL('http://google.com','Google')@@">GoogleLink</a>
  10. Add embedded images:
    <p><img src="@@EmbedImage("tcm:1-33")@@"/></p>
  11. To execute different code depending on the rendering being performed, use the @@OutboundEmail_IsRenderingEmail@@ Dreamweaver templating method.
  12. Add links to ChangeProfile, Unsubscribe, or Confirm Subscription Pages:
    <a href="@@OutboundEmail_ConfirmURL@@">Click here to confirm subscription</a>
    <a href="@@OutboundEmail_ChangeProfileURL@@">Click here to change your profile</a>
    <a href="@@OutboundEmail_UnsubscribeURL@@">Click here to unsubscribe</a>
  13. Click Save and Close.

Results

You have created a basic Dreamweaver Template.
<html xmlns="http://www.w3.org/1999/xhtml">
	<body>
		<p>This is an example of an Outbound Email Template.</p> 
		<!-- TemplateBeginRepeat name="Components" --> 
			<!-- TemplateBeginRepeat name="Fields" -->
				<p>@@textField@@</p>
			<!-- TemplateEndRepeat -->
		<!-- TemplateEndRepeat -->

		<p><img src="@@EmbedImage("tcm:1-33")@@"/></p>

		<a href="@@OutboundEmail_ConfirmURL@@">Click here to confirm subscription</a>
		<a href="@@OutboundEmail_ChangeProfileURL@@">Click here to change your profile</a>
		<a href="@@OutboundEmail_UnsubscribeURL@@">Click here to unsubscribe</a>
		<a href="@@GetLinkTrackingURL('http://google.com','Google')@@">GoogleLink</a>

	</body>
</html>

What to do next

For information about: