Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Link checker transformer and esi tags

Avatar

Level 1

Hello,

I am using the link checker transformer for rewriting the links. I need to modify the href attributes, but got stuck at a point where I need to append a variable(eg: "xyz") that is returned using esi tags (eg: <esi:include src = "www.try.com/hello" />), so the modified attribute should be something like <a href="https://forums.adobe.com/content/trial/xyz" />

I realized esi tags cannot be placed directly in the href attribute as the traffic server will not be able to interpret them. (eg: <a href="https://forums.adobe.com/content/trial/<esi:include src=\"www.try.com/hello\" />"

Note: The requirement is post AEM processing, that is the reason I have chosen link checker transformer to transform the attributes using SAX events, and so will not be able to make any changes in JSPs.

Can any one please let me know if there is any way I can work this out.

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

so do I understand you correctly, that you need to make the result of a HTTP call part of the URL? Basically the linkrewriter cannot do this by default, so you need to implement it by yourself. In that case you likely have to fetch this data asynchronously and weave it into the URLs in the rewriter. Async because any synchronous calls will slow down the postprocessing.

kind regards,
Jörg

View solution in original post

3 Replies

Avatar

Level 10

Sounds like you are using Varnish.

Is the src of "www.try.com/hello"  rendered by aem or different application. If aem they make sure transformed is called for that source.  In case not served by aem then transfer will not be aware of it.

Avatar

Correct answer by
Employee Advisor

Hi,

so do I understand you correctly, that you need to make the result of a HTTP call part of the URL? Basically the linkrewriter cannot do this by default, so you need to implement it by yourself. In that case you likely have to fetch this data asynchronously and weave it into the URLs in the rewriter. Async because any synchronous calls will slow down the postprocessing.

kind regards,
Jörg

Avatar

Level 1

Thank you for the response Sham. No,  "www.try.com/hello" is on a different domain and not an AEM application. we are not using varnish either. Apache is the origin server and Akamai is the edge server.