broman
broman

Reputation: 45

AEM HTL dynamic property name

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

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

Upvotes: 0

Views: 648

Answers (1)

Vlad
Vlad

Reputation: 10780

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

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

Upvotes: 0

Related Questions