SOLVED

Re: Email Guided Template Syntax

Go to solution
Janine_Willis
Level 2

Re: Email Guided Template Syntax

@Olivia Piper For clarification, you just ended up creating a module without the item rather than try to provide the hide functionality as a Local Variable? I am trying to give the option to hide a button in a hero module without creating a second module that doesn't have it. We already have so many modules in our one master template!

Olivia_Piper
Level 3

Re: Email Guided Template Syntax

Hi Janine Willis​,

I did use booleans within the modules, such as building a hero banner including a button with show/ hide functionality.

Here is some code you could use (if you are building your email with tables):

Place this in the <head> tag:

<meta class="mktoBoolean" id="showheroButton" mktoname="Show Hero Button?" default="true" false_value="none" true_value="table-cell" false_value_name="NO" true_value_name="YES" />

For the button, create a table within the main table of the module. Place the following in the surrounding <td> of the button table:

style="display:${showheroButton}"

You will also need to use the following CSS:

.none, .none table { mso-hide: all;}

This ensures that Outlook will hide the table correctly.

I hope this helps!

Inga_Romanoff12
Level 1

Re: Email Guided Template Syntax

Hi Olivia, where did you place the ".none, .none table {mso-hide: all;}" CSS? I am trying to add some boolean variables to CTAs in an email template, and have struggled with the Outlook issue.

What I'm confused by is where you got the class name ".none"?

Thank you!