I will like to have the possiblity to have my component to replace the tag whit a text
For example: "this is a [tag] text" (tag=normal )
in "this is a normal text " , i can replace the string and take the data from a content fragment but i'm not able to modify the text in a component
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi,
You could use a Sling Model to manually perform the replacement. Simply put, in the Sling Model, look for the property that contains the "[tag]" and replace it with any other value you need. Then return the new value and use it in your HTL.
Here you have an example of a sling model that can be useful: https://sourcedcode.com/blog/aem/how-to-pass-parameters-to-sling-modal-from-sightly-htl-component
Hope this helps.
Views
Replies
Total Likes