Email editor 2.0: variables in the text version

Email editor 2.0: variables in the text version

One limitation of the new text editor; variables are only supported in the HTML version, not is the text one.

So let's say you want to use a variable for the title of the email:

<p style="font-weight: bold; font-size:16px;">${EmailTitle}</p>

This paragraph would just not show up in the text version, meaning that the title you have set in the variable will not shown up in the text version.

-Greg

29 Comments
SanfordWhiteman
Level 10 - Community Moderator

Tokens work fine as well.

It's specifically a thing with variables (which didn't exist -- in Emails -- before 2.0)

SanfordWhiteman
Level 10 - Community Moderator
Dan_Stevens_
Level 10 - Champion Alumni

Sandy, we're using variables for all of our call-to-action buttons, for example:

<meta mktoModuleScope="true" class="mktoString" id="Two-col-CTA-url" mktoName="CTA URL" default="#">

....

a href="${Two-col-CTA-url}

And aren't experiencing the issues that you mention in your blog post (or the error that Jared received when trying to save his template).  And your fix isn't included anywhere in our template.  Wonder why this works for some and not for others?

BTW, is it me or is the Advanced editor not available here in the Ideas section - so that we can format/highlight code properly in our comments?

Grégoire_Miche2
Level 10

Hi Dan

It's not you The editor does not provide code highlighting on ideas.

-Greg

Grégoire_Miche2
Level 10

BTW, Sandy, we are not experiencing this pb either.

The result of variables in the text version is simply... nothing.

Would your workaround work to make any variable-based URL show in the text version ? That would be very, very cool.

-Greg

SanfordWhiteman
Level 10 - Community Moderator

Grégoire Michel​​ & Dan Stevens because I was wrong about the underlying cause, updated here: http://blog.teknkl.com/icymi-variables-text-version-break-links/

Would your workaround work to make any variable-based URL show in the text version ? That would be very, very cool.

I was wondering myself if it solves that and need to look back at it from that angle. Unfortunately I don't think it works w/tracked links, only if you're willing to have them be untracked on the text side.

Dan_Stevens_
Level 10 - Champion Alumni

Thanks for the update and further clarification, Sandy.  Makes sense now!

Ulf_Deeg
Level 3

I do the following workaround

  1. embed variables as follows:   a href="http://${CTA-url}"
  2. use tokens like {{my.CTA url}} and to use inside the variable field
  3. use token like {{my.CTA text}} for the button text
  4. add a HTML invisible mktoText section inside the same module that contains the CTA
    <div class="mktoText" mktoname="CTA Text Only" id="cta-textonly" style="display: none; max-height: 0px; font-size: 0px; overflow: hidden; mso-hide: all">
    {{my.CTA text}} <[[http://{{my.CTA url}}]]>
    </div>
  5. the Text Only version will pull in {{my.CTA text}} <[[http://{{my.CTA url}}]]> as a separate line

Our Email Programs have tokens for every CTA module (of which you will need clones anyhow when using Variables). CTA1 text, CTA1 url, CTA2 text, CTA2 url and so on.....

If you use a Master Email Program that gets cloned, your fine. We need this anyhow due to several languages we market to.

kh-lschutte
Community Manager
Status changed to: Open Ideas