Token within a token | Community
Skip to main content
November 25, 2016
Question

Token within a token

  • November 25, 2016
  • 3 replies
  • 2095 views

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
November 25, 2016

Anne,

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

But you can vote for the idea here:

Josh_Hill13
Level 10
November 25, 2016

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

SanfordWhiteman
Level 10
November 25, 2016

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.