How to Rewrite Plain text output not <HTML attribute> | Community
Skip to main content
Chandra_gupta
Level 4
October 16, 2015
Solved

How to Rewrite Plain text output not <HTML attribute>

  • October 16, 2015
  • 11 replies
  • 4575 views

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.
Best answer by JustinEd3

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

November 7, 2017

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