These guidelines are intended to serve as a foundation for best practices when creating editable content areas on custom email templates via MailChimp's email template language.

It's a good idea to limit the number of editable spaces in the template to keep things simple. And you should name all editable spaces consistently. The name you assign via mc:edit="somename" is used to create a field in the database to store the user's content. If they switch templates after writing content, they could lose their copy if the editable space names aren't consistent. Use the following conventions for common content areas:

  • mc:edit="header" - used to name the header of your email.
  • mc:edit="header_image" - used to name an editable header image.
  • mc:edit="sidecolumn" - used to name an editable left- or right-side column.
  • mc:edit="main" - used to name the main content space of your email.
  • mc:edit="footer" - used to name the footer of your email.

You should not place editable images within an editable content container.

Editable Content Area - mc:edit="section-name"

Attribute added to elements, whose content should be editable. Will open WYSIWIG text editor. The attribute value should alpha-numeric, and unique. Edit values can not be the same as any other in your template.

<td class="defaultText" mc:edit="main">
<h2 class="title">Primary Heading</h2>
<p>Sample copy. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Morbi commodo, ipsum sed pharetra gravida, orci magna rhoncus neque, id
pulvinar odio lorem non turpis.</p>
<h3 class="subTitle">Subheading</h3>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p>
</td>

Editable Image Area

Attribute added to image elements that are editable. Will open image upload/edit window. The attribute value should alpha-numeric, and unique. Edit values can not be the same as any other in your template.

<img mc:edit="postcard" style="max-width:600px;" />
Editable Text Header - mc:allowtext

Attribute added to header image to allow user to set a text heading instead of using an image.

<img mc:edit="header_image" mc:allowdesigner mc:allowtext />
Repeating Content Area

Defines a content block that can be repeatedly added to the template. An mc:edit item must always be nested within an mc:repeatable item, as seen below. Repeatable sections are appended with a unique ID every time a duplicate is created, and several repeatable sections within a template are possible.

<div class="article" mc:repeatable>
<h3 mc:edit="article_title">Title</h3>

<p mc:edit="article_content">Content</p>
</div>
Hideable Content Area

Defines a content block that can be toggled between hidden and shown during campaign creation.

<div mc:edit="content" mc:hideable>
</div>
Variable Content Area

Defines a content block that lets you switch between any number of different content structures (blocks of HTML) within your email. The mc:repeatable tag is familiar, save for one detail: it’s taking a name (in this case, product). That’s an important difference between a normal mc:repeatable tag, where no name is required. See More Examples.

<div mc:repeatable="product" mc:variant="content with left image"> </div>

Notes

If you're editing hideable sections in the Campaign Builder using the remove button in your campaign, please note, the section won't disappear in the Campaign Builder screen. The section you want to remove will fade, but remain - just in case you change your mind and want to use the space. However, when you send out your email, the section you have "removed" won't appear in your campaign. You can preview this change by clicking on popup preview.

The remove and hide this section buttons don't offer the same functionality in the Template editor. In fact, you can't actually remove anything while working in the Template editor. If you need to make changes like that, we suggest you work in the Campaign Builder instead.


Related Articles