Skip to main content
Level 2
Apr 9, 2025 4:53 AM UTC
Solved

Display selected tags in HTL

I am using cq/gui/components/tagspicker in my component dialog and want to display the selected tags in HTL. I have tried directly by using name property but this only displays the first selected tag. How to display all selected tags from component dialog in frontend?

Tethich
TethichAccepted solution
Community Advisor
Apr 9, 2025 6:05 AM UTC

Hi @zendarkke 

 

Can you share you HTL code ? I believe the property is an array so you might need to iterate it.

Also, I suggest using Sling models to read props and make the values available in HTL.

2 replies

Tethich
Community Advisor
TethichCommunity AdvisorAccepted solution
Community Advisor
Apr 9, 2025 6:05 AM UTC

Hi @zendarkke 

 

Can you share you HTL code ? I believe the property is an array so you might need to iterate it.

Also, I suggest using Sling models to read props and make the values available in HTL.

Translate
ZendarkkeAuthor
Level 2
Apr 9, 2025 9:38 AM UTC

Thanks , went forward with using the sling model approach

Translate