If you code your own email template, you can use Mailchimp’s Template Language to add repeatable and variable content blocks to your layout. These blocks help you to create a customized design that can be modified in the Campaign Builder. Even if someone else built your template, you’ll still be able to repeat, delete, reposition, and edit the content blocks.
In this article, you'll learn how to use content blocks created with our Template Language.
Many of our retired email templates include repeatable and variable content blocks like the ones covered in this article. If you’re still using one of these old templates, we recommend you switch to a newer drag-and-drop template for more control over your layout. To learn more, read Types of Templates.
Repeat or delete content block
When you repeat a content block, we'll replicate the original text and placeholder image that were coded into it. Images and content you've added won't be replicated. The original block can't be deleted until the repeated section is deleted.
Hover over a content block to view the repeat and delete controls. Click the plus (+) icon to add another block and click the minus (-) icon to delete the block.
Change block type
Variable content blocks allow you to switch between a number of different content structures in your layout. They include a drop-down menu that lets you to choose which type of content block to display.
To change the type of block, click the drop down menu and choose the structure you want to work with.
Reposition content block
Repeatable and variable content blocks can be moved vertically within a template. After you repeat a content block, you'll see arrows in the top-left corner that you can click to drag the block up or down.
When you click on the arrow to move the block, you'll see a blue bar that can be dragged and positioned where you'd like the content block to move. You can only drag and drop a content block inside the area of the layout that it's coded into. For example, it wouldn't be possible to move a block from the right column into the left column, or from the body to the header.
Hide or show content block
If you intend to reuse your custom-coded template, you may want to hide a content block instead of deleting it. When you hide a content block, it will appear as grayed out in the Campaign Builder and won't show up in sent campaigns.
To hide a content block, hover over it and click the slashed eye icon.
To show a hidden content block, click the eye icon on the faded block and watch it appear.
Preview and test
To verify that your content blocks are shown or hidden as expected, click the Preview drop-down and choose Enter Preview Mode.
Edit content block
To change the text or image in your content block, click Edit to open the Editable Region panel.
In the Editable Region, make any changes you need and click Save & Close.
The delete control will apply to any text or images in the content block. If you only want to delete the image portion of the content block, click the Remove button in the image area.
The delete and hide controls don't offer the same functionality in our Template Editor. If you need to make layout changes, we suggest you work in the Campaign Builder instead.
Have a question?
Paid users can log in to access email and chat support.