We are using handlebar in AEM. We are passing the AEM authored data as a context to the handlebar template. It works fine. In the AEM component dialog, we have a link field that has a path starting with /content/<appname>
.When I render this component with handlebar.hbs file, the link is not getting shortened, but when we put this component on the HTML page, Apache resource resolver configuration comes into the picture, and shortens the URL as per the URL mapping defined. I know we can use the resource resolver .map() function map the shorten the URL in the data but I would like to know if there any other way we can fix to shortened the URLs while using the handlebar?
Views
Replies
Total Likes
Hi @karanmahi ,
It is advisable to use config Apache sling resource resolve factory for field resource.resolver.mapping only for publish instance to test it like a live environment.
Thus, if you have this configuration in the Author or common config folder, move it to config. publish folder and link should start working on Author as it is.
I am sure, you do have also all the standard mappings/rules on dispatcher like to map a hostname to AEM sites, etc.
Views
Replies
Total Likes