Hi I have a component where I need to get tags and render their localized titles. I have localized titles for tags and I would like to access those localized value, but not sure how to any suggestions please?
HTL
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @bpeddapudi, you can try below code, it will list all available localized values for given tag. To get more control you can move your code into Sling model.
<ul> <li data-sly-repeat.tag="${relatedTags.iterator}"> ${tag.title} <br /> // get localized title <sly data-sly-list="${tag.localizedTitles.entrySet}"> ${item.value} <br /> </sly> </li> </ul>
Hi @bpeddapudi, you can try below code, it will list all available localized values for given tag. To get more control you can move your code into Sling model.
<ul> <li data-sly-repeat.tag="${relatedTags.iterator}"> ${tag.title} <br /> // get localized title <sly data-sly-list="${tag.localizedTitles.entrySet}"> ${item.value} <br /> </sly> </li> </ul>
Thanks Lukasz I will move the code to the model
Views
Likes
Replies