Level 1
Level 2
Sign in to Community
Learn more
Sign in to view all badges
Expand my Community achievements bar.
Hi,
I need to join a string array with whitespaces.
I'm doing that this way:
${item.tagNames @ join=' '}
But when it is printing it this way in the HTML:
tuna sushitypes
Is there any way to do that?
Thaks
Solved! Go to Solution.
I found a way:
1. Store it using data-sly-test
<div data-sly-test.joined="${item.tagNames @ join=' '}" data-sly-unwrap />
2. Use the context='unsafe'
${joined @context='unsafe'}
Thanks
View solution in original post
You can also combine options, like @ join=' ', content = 'HTML'
Try to avoid the 'unsafe' context, the first output you had was correct, because the space was escaped for XSS.
In this doc-link you can find more @ context options: http://docs.adobe.com/docs/en/aem/6-0/develop/sightly.html
Views
Likes
Replies
Like