1

With soy, I would like to concatenate two strings (hard-coded or variables) into one. My idea was to "parametrize" the first variable with the second:

{let $key: 'abc_$anothervariable' /}

This doesn't work. I also tried using builtin join() function for lists:

{let $key: join(['abc', $anothervariable], '') /}

But this approach doesn't work either - it even seems to have invalid syntax. Is it even possible to do something like that in Closure Templates?

cs95
  • 379,657
  • 97
  • 704
  • 746
magnes
  • 139
  • 1
  • 2
  • 11

1 Answers1

3

The answer actually turned out to be as easy as:

{let $key: 'abc_' + $anothervariable /}

magnes
  • 139
  • 1
  • 2
  • 11