mapping assets and clientlibs | Community
Skip to main content
New Participant
April 26, 2017
Solved

mapping assets and clientlibs

  • April 26, 2017
  • 3 replies
  • 1815 views

Hi,

For the assets references in the page, we have links as /content/dam/xx/abc.png . Is it possible not to expose the internal path of the asset (/content/dam) , so that we can have a link as /xx/abc.png in the page which is resolved to the actual path internally and displays the asset properly over dispatcher and publisher?

Sly , there is a need of not to expose the path -  /etc/designs for clientlibs in the browser but should internally resolve and renders the clientlibs without the /etc/design path.

How do we achieve it and do we need to do something in dispatcher as well?

Regards

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 MC_Stuff

Hi Richu,

Out of the box not configurable. Need to write an transformer & sample reference at

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

Thanks,

3 replies

MC_Stuff
New Participant
May 9, 2017

Hi Richu,

   Configuring resource resolver url mapping [A] should work for dam.   For etc never tried, If does not work use alias? 

[A]  http://host:port/system/console/configMgr/org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl

Thanks,

K_RichuAuthor
New Participant
May 8, 2017

Hi,

Thanks for the suggestion.

I tried using the sling rewriter and able to rewrite the links for clientlibs and dam assets.

Now the assets are being rewritten as :

http://localhost:4502/company/global.css

http://localhost:4502/company/abc.js


But I am not able to render them as AEM is not resolving it.

I even tried providing configuration in etc/map/http by creating a node as following

/etc/map/http -> node (company) of type sling:Mapping

with properties as :

    
sling:internalRedirect  -> /etc/designs/x/global.css

    
sling:match -> localhost:4502/company/$

But its not working.

My AIM is to render the scripts/designs/dam assets

as

 

http://localhost:4502/company/global.css  which internally gets resolved as /etc/designs/x/global.css

http://localhost:4502/company/abc.js which internally gets resolved as /etc/designs/x/abc.js

http://localhost:4502/company/abc.png which internally gets resolved as /content/dam/x/abc.png

How can we achieve it ?

MC_Stuff
MC_StuffAccepted solution
New Participant
April 26, 2017

Hi Richu,

Out of the box not configurable. Need to write an transformer & sample reference at

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

Thanks,