Externalize cq:includeClientLib Tag | Community
Skip to main content
Level 2
October 16, 2015
Solved

Externalize cq:includeClientLib Tag

  • October 16, 2015
  • 2 replies
  • 904 views

Hi ,

I have written a tag to externalize the urls on the rendered html on my page . I am using that tag to externalize <a href> and src attributes .

I want to externalize the <link rel="stylesheet" href="/etc/....." type="text/css"/> which is rendered from <cq:includeClientLib css="designs.testproject">

 

How can i use my tag which receives a URL as parameter to externalize URL rendered through a category name given in  <cq:includeClientLib> tag.

My tag syntax is like this <o:link path="url to externalize"/>

Please help in this .

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

Hi,

You can do this with a rewriter transformer. See https://github.com/Adobe-Consulting-Services/acs-aem-commons/blob/master/bundle/src/main/java/com/adobe/acs/commons/rewriter/impl/StaticReferenceRewriteTransformerFactory.java for an example of something similar.

Regards,

Justin

2 replies

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015
Scott_Brodersen
Level 8
October 16, 2015

There is also an example in the docs (in the context of a Dispatcher implementation)

https://dev.day.com/docs/en/cq/current/deploying/dispatcher/disp_domains.html#Rewriting%20Links%20to%20Non-HTML%20Files

scott