Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
SOLVED

mapping assets and clientlibs

Avatar

Level 2

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

1 Accepted Solution

Avatar

Correct answer by
Level 9

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,

View solution in original post

3 Replies

Avatar

Correct answer by
Level 9

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,

Avatar

Level 2

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 ?

Avatar

Level 9

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.JcrResourceResolver...

Thanks,