When you build your own template, we do our best to validate your code and ensure that the result is compliant with industry standards. However, please be aware that the only way to guarantee this, and that Emarsys will be able to support with any issues that arise from these templates, is to submit your design to us and let us build it for you. For more information, see Ordering an email template from Emarsys.
For live code examples visit the Emarsys pre-built template in the style editor and check how to build a structure of variables, what variables can be set for each content element, how to name them.
To create your own template, proceed as follows:
- Open the Channels menu and select Email Campaigns.
- Click Create Email.
Remember to choose Block-Based Editor if you are asked to choose which editor to use.
- On the Your Templates page, click one of the two options to Create Template.
- Follow the tabs on the left in order, from top to bottom. These are described in more detail below.
Deleted email templates can be restored. Learn more.
On the Frame Editor tab, you select the doctype for the email and add the HTML code which provides the basic layout of your email campaign.
A basic frame HTML contains two placeholders: #style# and #body#. These are compulsory elements of the frame HTML code. #style# stands for the code you provided in Style Editor, and #body# represents the blocks you inserted into your template.
The Style Editor is where you paste in the CSS that will determine the style of your email.
After you've created your frame and style, you can start creating the Content Blocks. You should create a block for every element in your email, including the header and footer.
- Every Content block should start with a block-level element, eg. <div>...</div> or <table>...</table> or <tr>...</tr>. It is the Email template validation engine that defines the required block-level element.
- To insert spaces in the text version of VCE emails, use spaces instead of tabs in the HTML code. Avoid using tabs as they will result in missing spaces between words in the texts.
In order to maintain the best performance of the system, try to limit the number of blocks in a template to 30.
To create a content block, click Create New Block and then paste in your HTML code. This will immediately become visible in the preview pane.
When you have created all your content blocks, they will be available for selection in the column on the left.
The blocks are listed here alphabetically. You can use numerical prefixes to determine the display order (as shown above) so that this reflects the order they will appear in the email.
To create the default view, insert the blocks into the template, either by clicking Insert Into Template on the block itself and then clicking Insert or drag block here, or by simply dragging it into the Insert or drag block here drop zone.
If you click this on a block in the preview pane, you remove it from the preview. If you click this on a block in the Content Blocks list on the left, you delete it from the template entirely.
Editable and optional content
Editable content - the e-editable attribute
The content you add to your template is by default fixed and will be the same for all your campaigns.
However, if you have some content which needs to be updated campaign by campaign is recommended that you leave this open to editing.
For more information, see Editable content - the e-editable attribute.
Optional content - the e-optional attribute
If you think you will regularly need blocks that contain similar, but not identical content, you can define elements within the block to be optional.
For more information, see Optional content - the e-optional attribute.
Variables and fonts
If you build a lot of templates, you can use variables in your HTML and CSS to customize your email campaigns easier.
For more information, see Variables.
You can add custom fonts to your template.
- For compliance reasons you can use:
- licensed fonts, or
- locally hosted, offline embedment of fonts.
- It is at your own risk to upload font files to the Media Database. Any content uploaded to the Media Database is at your own risk and you need to check if the content is protected by copyright laws. For more information, see Adding fonts - FAQ.
- While some online web fonts have been known to work, we do not support them due to data protection concerns around personal data transfers outside the European Economic Area.
For more information, see Adding fonts.