get value of the string stored in a variable, whose name stored as string in another variable

前端 未结 1 1942
情深已故
情深已故 2021-01-20 03:04
<#assign blah = \"foo\">
<#assign foo = \"awesome\">

Can we render \"awesome\" without referencing foo ?

I tried something like

相关标签:
1条回答
  • 2021-01-20 03:36

    There is an eval built-in which evaluates a string as an FTL expression.

    In your case use it like this:

    ${blah?eval}
    
    0 讨论(0)
提交回复
热议问题