Token within a token

Anonymous
Not applicable

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

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

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.

Josh_Hill13
Level 10 - Champion Alumni

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

Devraj_Grewal
Level 10 - Champion Alumni

Anne,

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

But you can vote for the idea here: