Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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. 

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.