Hi,

Being relatively new to Sling, is there an OOTB way to allow special tokens to 
be inserted into the textual content (not into sly/jsp templates) that when 
rendered can be resolved to some value (e.g. invoking a method on a service or 
a reference to a property in the JCR).

eg:

/apps/pages/productdetails.html

/content/page/product1details
        - sling:resourceType: pages/productdetails

/content/products/product1
        - description : string = “This is the description of Product 1, hurry - 
discount of $JCR[‘/content/promotions/discounts:holidayspecialdiscount’]% 
applies!”

/content/promotions/discounts
        - holidayspecialdiscount : double = 10

So I would like Sling to resolve the $JCR token so that what is shown to the 
user would be:

"This is the description of Product 1, hurry - discount of 10% applies!"

So how would you approach this in in a Sling environment. 

Many thanks,
Adam. 


Reply via email to