Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
khamat_bn
khamat_bnAccepted solution
Level 4
Jun 4, 2020 3:44 PM UTC

@satish_jadhav 

Yes its possible to use without java. We have to use data-sly-list attribute and should pass the tag property name in expression.After that via item object we can fetch each tags from string array.

Note that tag property should have name cq:tags 

Happy coding,

~BK 🙂

3 replies

Ravi_Pampana
Community Advisor
Community Advisor
Jun 4, 2020 4:34 AM UTC

Hi,

 

You can iterate through tag values using below syntax

 

<ul class="two" data-sly-list="${properties['cq:tags']}">
<li>${item}</li>
</ul>

 

cq:tags in jcr:content

 

 

Will output as below

 

Hope this helps!

Translate
Ravi Pampana
BrianKasingli
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Jun 4, 2020 8:08 AM UTC

It's possible. From not using Sling Models, you can try to use JavaScript-Use or Java-Use API to expose an array of Tag Objects.

Translate
khamat_bn
khamat_bnAccepted solution
Level 4
Jun 4, 2020 3:44 PM UTC

@satish_jadhav 

Yes its possible to use without java. We have to use data-sly-list attribute and should pass the tag property name in expression.After that via item object we can fetch each tags from string array.

Note that tag property should have name cq:tags 

Happy coding,

~BK 🙂

Translate