I'm looking to see if it is possible to get a string of HTML from a service and execute the sightly parser on that string. We have a service layer that returns HTML and I'd like to be able to have sightly markup within that HTML for processing. For example using i18n ${'key', @i18n}.
I've tried wrapping the HTML returned in a sightly template and then calling it within my sightly component but unfortunately it did not work.
Solved! Go to Solution.
Views
Replies
Total Likes
The best practice to handle DOM parsing when writing a Sightly component is to have the Java logic (part of the Sightly component) handle the parsing.
You can use a Java API to handle the logic - such as JSOUP API. Sighly is for displaying data - not for manipulating data like DOM parsing. It way better to handle that on the Java side.
See this community article:
https://helpx.adobe.com/experience-manager/using/domparser.html
Hope this helps you.
Views
Replies
Total Likes
The best practice to handle DOM parsing when writing a Sightly component is to have the Java logic (part of the Sightly component) handle the parsing.
You can use a Java API to handle the logic - such as JSOUP API. Sighly is for displaying data - not for manipulating data like DOM parsing. It way better to handle that on the Java side.
See this community article:
https://helpx.adobe.com/experience-manager/using/domparser.html
Hope this helps you.
Views
Replies
Total Likes
Thanks, that's pretty much what I figured as well, was just hoping to leverage what was already there. Appreciate the input.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies