Skip to main content
Chandra_gupta
Level 4
Oct 16, 2015 2:28 AM UTC
Solved

How to Rewrite Plain text output not <HTML attribute>

com.day.cq.rewriter.pipeline.RequestRewriter or org.apache.sling.rewriter.Transformer helps to rewrite any html tag's attribute value that i am able to do it.

But I am trying to do rewrite plain text like {string.token) with any value.

for example :

Here is content in CRX when it would be rendered , {string.token} should be replaced with some dynamic value..... if i place that token as attribute in <p> i can do easily but i want that as plain text not as attribute of html tag. any thought?

<p> Hello world {string.token) , I am good<p>

Thanks Chandra

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
JustinEd3Accepted solution
Adobe Employee
Oct 16, 2015 2:28 AM UTC

Chandra-

I don't understand your reference to i18n in the second post.

But regarding the overall question, this is possible with a Transformer pipeline component. In SAX, characters are passed to the characters() method.

11 replies

Nov 7, 2017 12:00 AM UTC

@justin_at_adobe Sorry, the transformer called in Dispatcher. it's my bad not verified the logs properly, kindly ignore the original message. Thanks!

Translate