Link Rewriter (Transformer) doesn't process content in personalized components. | Community
Skip to main content
New Participant
October 16, 2015
Solved

Link Rewriter (Transformer) doesn't process content in personalized components.

  • October 16, 2015
  • 1 reply
  • 1225 views

Hello.

I need some prostprocessing for link rewriting on pages.

There is some transformer that implements org.apache.sling.rewriter.Transformer and registered with some org.apache.sling.rewriter.TransformerFactory

The transformer works fine except personalized content. So if I have some component with links, the transformer will rewrite them. But if I have

the same component but with personalized content, its links will not be rewritten at all.

It looks like the page postprocessing occurs before inserting of personalized content.

Is there are any ways to resolve this problem.

 

P.S. SP2 is installed.

Thanks.

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 smacdonald2008

Take a look at this community article:

https://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html

"page postprocessing occurs before inserting of personalized content"

TO get it to work with personalized content, you may have to implement custom logic. Look at this class:

http://docs.oracle.com/javase/1.5.0/docs/api/org/xml/sax/ContentHandler.html

The Transformer interface extends this. 

Look to see if the ContentHandler interface offers a way get app logic into your OSGi to handle personalized content. 

If using the APIs - there is no way - then open an AEM ticket. 

1 reply

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

Take a look at this community article:

https://helpx.adobe.com/experience-manager/using/creating-link-rewrite.html

"page postprocessing occurs before inserting of personalized content"

TO get it to work with personalized content, you may have to implement custom logic. Look at this class:

http://docs.oracle.com/javase/1.5.0/docs/api/org/xml/sax/ContentHandler.html

The Transformer interface extends this. 

Look to see if the ContentHandler interface offers a way get app logic into your OSGi to handle personalized content. 

If using the APIs - there is no way - then open an AEM ticket.