Skip to main content
Nov 25, 2016 12:58 PM UTC
Question

Token within a token

Can you add a token in another token?

Eg.      {{my.event{{my.event.city.1}}}}

            {{my.event{{my.event.city.2}}}} etc.

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Devraj_Grewal
Level 10
Nov 25, 2016 5:27 PM UTC

Anne,

Unfortunately, it is not possible: https://nation.marketo.com/message/121397#comment-121397

But you can vote for the idea here:

Translate
Josh_Hill13
Level 10
Nov 25, 2016 7:51 PM UTC

If you need to do variables, you can do Email Scripting. There's a short tutorial if you search.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Nov 25, 2016 9:22 PM UTC

Glad @Josh Hill​ brought up Velocity because it's better to think in terms of business or functional requirements than in terms of some specific syntax. 

Like Devraj said, you can't use curly-braced {{my.tokens}} inside other {{my.tokens}}. 

However, if what you want is actually the ability to compose token content out of other token content, you can definitely do that with Velocity (it is one of the most powerful things about VTL).  So you can have {{my.finalContent}} draw from (non-displayed) content in {{my.partialContent1}} and {{my.partialContent2}} -- and each of those {{partials}} can be drawing on different lead fields.  The syntax with which the tokens are embedded in the email is not visually "nested" (they appear {{one}}{{after}}{{the}}{{other}}) but that's not relevant if the effect is what you want.

Translate