Create your own templates
With a few simple tags, you can turn any HTML page into a re-usable email template. This is especially handy for designers that have clients who want to send their own emails. Using our simple WYSIWYG editor, they can add their own text and images to each email, send it to their subscribers and view reports on the results.
If you’re familiar with XHTML and CSS, it’s usually easier to build your emails using your own tools rather than using the editor each time. Then you can just import it ready to send in a single click. Our templates are perfect for those clients who feel more at home in Word than TextMate.
Handy template resources

- Sample email template
- A simple HTML template that contains all our tags.

- Templates cheatsheet
- View all of our tags at a glance with this PDF cheatsheet.

- Free HTML templates
- 30+ themed templates pre-built with Campaign Monitor tags.
Our Simple template language
Making content editable
Quick Links
|
Dates
Personalization
|
Making Content Editable
You can use these tags to create templates for your client, allowing them to manage the content for their campaigns while your design stays intact. Just put these tags in with your regular HTML to create dynamic areas of your template that your clients can change.
return to topSingle Line: <singleline>
Outputs a string you can modify in the editor. Used for smaller strings such as headings, and allows your client to wrap a link around the text. Any text you include inside the tag pair will be used as the default value. The content author can optionally add a link to the complete text using the editor.
Optional Attributes
label=''
If you include a label attribute, it will be shown above the text field when the author is editing it. For example, useful labels might be 'Headline' or 'Caption'.
repeatertitle='true'
If included (on a single line item inside a repeater block) this text will become a link in the table of contents to the repeater block. You can mark as many different singline items for the table of contents as you like, but only one in any specific layout (or one per repeater block if you don't use layouts).
Example
<h2> <singleline label='Pull Quote'>Pullquote here</singleline> </h2>
Would look like this in the WYSIWYG editor:
and would output something like:
<h2> <a href="http://mydomain.com/page/">Pullquote here</a> </h2>
return to topMulti Line: <multiline>
Outputs HTML you can modify in the WYSIWYG editor. Used for larger bodies of text and is automatically converted to HTML (so it will contain one or more paragraphs).
Optional Attributes
label=''
If you include a label attribute, it will be shown above the text field when the author is editing it. For example, useful labels might be 'Article' or 'Product Details'.
Example
<multiline label='Main Feature Intro'>Main feature introduction</multiline>
Would look like this in the WYSIWYG editor:
Would output something like:
<p>Main feature introduction</p>
return to topImage: <img editable="true">
Add the editable="true" attribute to the normal <img> tag and you can remove or replace the image in the editor. Also allows your client to automatically wrap a link around the image and add an alt atribute.
Required Attribute
width=""
You need to specify a width (not a % width, but a pixel width) on your <img> tag. Any images wider than the specified width that are uploaded in its place will automatically be proportionally resized to the value set. Images narrower than specified will not be resized at all (the width tag will be updated to match the narrower image size in that case). You should not specify the height, as that can result in distorted images.
Optional Attributes
label='image title'
If included, this text is shown for the content author when they edit the image. Use it as a guide to the type of image needed. For example label='Hero Image'.
src='image.jpg'
The image source optionally specified in your HTML will be used as the default image and will show up in the final email unless your client removes or replaces it.
Example
<img editable="true" src="image.jpg" width="200" label='Hero Image' />
Would look like this in the WYSIWYG editor:
and would output something like:
<a href="http://mydomain.com/page/"> <img src="image.jpg" width="200" alt="ABC Widgets header"> </a>
return to topRepeater: <repeater>
Defines a content block that can be repeated an infinite number of times in the template. Must include either a <singleline>, <multiline>, or <img editable="true"> tag. You can have an unlimited number of repeaters in your template, and each repeater can contain any number of editable single line and multi line elements, as well as editable images. These are usually used for lists of articles or features which can repeat an unknown number of times.
You can use the optional layout element described below to specify as many different designs as you like for content items in this repeating block.
Example
<repeater>
<h2>
<singleline label="Title" repeatertitle='true' >Title of article/tip/resource</singleline>
</h2>
<multiline label="Article Body" >Enter the full text</ multiline>
</repeater>
Would look like this in the WYSIWYG editor:
and would output something like:
<h2>
<a href="http://mydomain.com/page/">Title of article/tip/resource</a>
</h2>
<p>Enter the full text</p>
Note that when using tables in your code, repeater tags must contain entire tables, not individual <tr> rows.
return to topLayout
Repeater layouts are a powerful tool for designers used only within a repeater tag. By specifying one or more layouts inside a repeater block, you can have multiple separate designs inside the one repeating element. A simple example would be having one story layout with a left-aligned image, and another with a right-aligned image. However the layouts can be completely different, and can include any number of editable elements inside them.
You might have a simple text story layout, and a grid of images layout, and a hero-shot layout as three options in the one repeating block. This gives your client flexibility to vary their emails each time according to their needs.
Optional Attributes
label='layout name'
Each layout can optionally be named using the label='' attribute. Naming layouts makes it simple for your client to know which layout to choose for any given content item. The label will be shown as drop down options in the WYSIWYG editor when they click the 'Add new' button.
Here is an example of the 'Add New' menu showing a choice of three labeled layouts:
Remember that either every layout in a repeater should have a label, or none should. If you don't use labels, then the 'Add new' button does not have a drop down menu, and simply rotates through the available layouts with each click.
Example
<repeater> <layout label='New Feature'> <h2> <singleline label="Title" repeatertitle='true' >Title of new feature</singleline> </h2> <multiline label="Description" >Description</ multiline> </layout> <layout label='Article, tip or resource'> <h2> <singleline label="Title of Article" repeatertitle='true' >Title of Article</singleline> </h2> <multiline label="Description" >Description</ multiline> </layout> <layout label='Gallery Highlights'> <img src="gallery.png" width="140" editable="true" label="Image 1"><br /> <img src="gallery.png" width="140" editable="true" label="Image 2"><br /> <img src="gallery.png" width="140" editable="true" label="Image 3"> </layout> </repeater>
Would output something like:
<h2> <a href="http://mydomain.com/page/">Title of new feature</a> </h2> <p>Description</p> <h2> <a href="http://mydomain.com/page/">Title of Article</a> </h2> <p>Description</p> <img src="widget.png" width="140" alt="Product one"/><br /> <img src="gadget.png" width="140" alt="Product two"/><br /> <img src="gidget.png" width="140" alt="Product three"/>
Note that when using tables in your code, layout tags must contain entire tables, not individual <tr> rows.
return to topTable of Contents: <tableofcontents>
Creates an automated list of every single line content item that includes the repeatertitle attribute in your template. You must include a <repeatertitle> tag inside the table of contents.
Example
<ul> <tableofcontents> <li> <repeatertitle/> </li> </tableofcontents> </ul>
Would output something like:
<ul> <li> <a href="#1">This is my first title</a> </li> <li> <a href="#2">This is another title</a> </li> <li> <a href="#3">I like titles</a> </li> </ul>
return to topRepeater Title: <repeatertitle/>
Outputs a link to a content item, using the text from each <singleline> element which included the repeatertitle='true' parameter. Used exclusively within the <tableofcontents> tag.
Example
<tableofcontents> <repeatertitle/> </tableofcontents>
Would output something like:
<a href="#1">This is my first title</a> <a href="#2">This is another title</a> <a href="#3">I like titles</a>
return to topDisabling Link Tracking and Image Importing
Use these snippets in your link and images tags to turn off link tracking for any link in your content, or prevent us from importing a specific image and referencing it on our servers instead of your own.
Turning off image importing – cm_dontimportimage – For example:
<img src="http://www.myserver.com/filename.jpg" width="400" height="300" alt="alt text here" cm_dontimportimage>
Turning off link tracking – cm_dontconvertlink – For example:
<a href="http://www.myserver.com" cm_dontconvertlink>this is a link</a>
Quick Links
These tags can be used in all of your campaigns, whether you are using templates or not, or even just in plain text campaigns.
return to topWeb Version: <webversion>
Defines a link to a web-based version of the campaign, where recipients can view the campaign in their web browser.
HTML emails – <webversion>your content here</webversion>
Plain text emails – [webversion]
return to topForward to a Friend: <forwardtoafriend>
Defines a link to a forward to a friend page where recipients can forward the email to up to 5 friends at a time, and even add their own personal message.
HTML emails – <forwardtoafriend>your content here</forwardtoafriend>
Plain text emails – [forwardtoafriend]
return to topUnsubscribe: <unsubscribe>
Defines a single-click unsubscribe link in your template. Please note that it is a requirement to include our single-click unsubscribe link in all of your campaigns.
HTML emails – <unsubscribe>your content here</unsubscribe>
Plain text emails – [unsubscribe]
return to topPreference Center: <preferences>
Defines a link to the preference center, where each subscriber can update their subscription details or unsubscribe.
HTML emails – <preferences>your content here</preferences>
Plain text emails – [preferences]
return to topFacebook Like: <fblike>
Creates a link to 'Like' the email campaign on the personal Facebook page of the recipient.
HTML emails – <fblike>your content here</fblike>
Plain text emails – [fblike]
If you don't insert text or image content between the tags, the default Like image will be shown instead. You can also set the address of a page you'd like your subscibers to like on Facebook by adding the likeurl property. For example:
<fblike likeurl="http://yourdomainhere.com">your content here</fblike>
return to topTweet: <tweet>
Creates a link to Tweet the public web URL for the email campaign.
HTML emails – <tweet>your content here</tweet>
Plain text emails – [tweet]
If you don't insert text or image content between the tags, the default Tweet image will be shown instead. You can also add "via" and "recommend" parameters to the tweet. "Via" lets you insert a twitter handle that will be mentioned in the tweet as the originator, and "recommend" will show the included twitter user as a follow suggestion, after the tweet is posted.
<tweet via="johnsmith" recommend="mattsmith">
Dates
Outputs date related text based on when a campaign is sent. Used to add date related text, such as “July Newsletter” to your templates that automatically updates when your client sends their campaign.
<currentday> – outputs a numeric representation of the day of the month e.g. 8
<currentdayname> – outputs a textual representation of the day e.g. Wednesday
<currentmonth> – outputs a numeric representation of the month e.g. 7
<currentmonthname> – outputs a textual representation of the month e.g. July
<currentyear> – outputs a numeric representation of the year e.g. 2009
Example
<currentmonthname> <currentday>, <currentyear>
Would output something like:
July 8, 2009
Personalization
Add your recipients personal data into your email content. You can also personalize your emails with custom field data.
First Name – [firstname,fallback=your content here]
Last Name – [lastname,fallback=your content here]
Full Name – [fullname,fallback=your content here]
Email address – [email]
Custom fields - [customFieldName,fallback=your content here]