Dynamic tags: dynamic content blocks in email design

Use a dynamic tag to control the display of an entire content block in your email design to specific subscribers. Making conditional content blocks in your email design requires a basic dynamic tag and updating the HTML. Review all the sections of this article to learn how to do this properly. 


Topics covered in this article:

General guidelines for using dynamic tags to display content blocks

How to add your dynamic tag around a content block

Learn more about dynamic tags and personalization

 

General guidelines for using dynamic tags to display content blocks

Dynamic content blocks use the same methodology and best practices that other dynamic tags use. Instead of adding the tag inside a text block, you will add the dynamic tag straight into the HTML code.

 

Example of simple dynamic tag,

{{if(##City## == Seattle) then (insert statement) endif else() endelse}}

 

Your email content block becomes the statement that will be enclosed in your dynamic tag's parentheses. In Modern Editor, your content block is simply a container built through a series of div tags.

 

Example of a text block container in Modern Editor,

<div data-wfcb="text" data-wflabel="Text" class="text-block" draggable="false" id="text-block-1510526568694">
<div data-wfedit="html">
<p align="left">To start designing, drag elements from the Blocks tab and drop them here. Then rearrange or delete them as needed. Click here when you're ready to add your text content, <a href="http://www.wordfly.com" target="_blank">insert links</a>, and <strong><em>apply styles</em></strong>.</p>
</div>

 

Locate the content block container in your HTML and wrap the block in the dynamic tag with the entire block code inside the parentheses, the same way you would add a single word or phrase in tags.

 

Example of dynamic tag in code,

{{if(##City## == Seattle) then (<div data-wfcb="text" data-wflabel="Text" class="text-block" draggable="false" id="text-block-1510526568694">
<div data-wfedit="html">
<p align="left">To start designing, drag elements from the Blocks tab and drop them here. Then rearrange or delete them as needed. Click here when you're ready to add your text content, <a href="http://www.wordfly.com" target="_blank">insert links</a>, and <strong><em>apply styles</em></strong>.</p>
</div>) endif else() endelse}}

 

Make sure your tag avoids common issues that cause tags to break. Before getting started, we recommend reviewing these articles:

 

 

 

How to add your dynamic tag around a content block

After reviewing the general guidelines, follow these steps to make a content block dynamic in your email design.

 

First, create and copy your dynamic tag.

1. Go to Subscribers > Dynamic tags.

2. Use the dynamic tag generator tool to create your unique if/then conditional tag.

Learn how to create your dynamic tag.

3. Copy your dynamic tag.

We recommend pasting the tag into a plain text editor since the next steps require copying other content.

 

Second, add the tag to your Modern Editor email design.

1. Open your email in Modern Editor.

2. On the preview panel (right side), click on the content block you would like to make conditional.

 

3. On the edit panel (left side), click STYLES.

 

4. Copy the container ID.

 

5. In the lower left corner, select the HTML tab.

 

6. Click anywhere in the HTML and search for the container ID.

Tip: The keyboard command for search is "ctrl+F"

 

7. Add a return above your container <div>.

 

8. Paste in the dynamic tag up to the opening parentheses.

 

9. Add a return below your container's closing </div>.

 

10. Paste in the remainder of the dynamic tag from the closing parentheses.

 

11. Close the HTML tab by clicking the tab again.

 

12. Save your updates.

 

That's it!

 

Be sure to test your dynamic tag using Subscriber Preview under the Testing section of your email campaign. Learn more.

 

 

Learn more about dynamic tags and personalization

We've put together support posts about all our personalization features.

 

 

 

Have more questions? Submit a request
Powered by Zendesk