AEM HTL dynamic property name

396 Views Asked by At

Is there any way in HTL to use dynamic property name something like this

${class.map['prefix' + item.name]}
1

There are 1 best solutions below

0
Vlad On BEST ANSWER

You could take advantage of data-sly-set to do a concatenation before the rendering:

<sly data-sly-set.appended="prefix${item.name}">${appended}