Does Sling mapping apply to jcr:content path nodes

Question

Does Sling mapping apply to jcr:content path nodes

Answer

If you create a page and place the download component on the page and then configure it to make the example PDF available for downloading, you will notice that the URL used for the PDF has not changed. This is because even though you defined the necessary mappings (as we did above) and you can test them to make sure they work, AEM by default only uses the mapping rules for URLs associated with HTML pages.

So links to things like PDFs stored in the DAM never get rewritten. This behavior can be overridden by deploying a custom implementation of the com.day.cq.rewriter.pipeline.RequestRewriter service into the OSGi container. If you do this, AEM  picks up the custom implementation and consults it when it comes to rewriting URLs in pages.

Link:- http://www.cqblueprints.com/tipsandtricks/serving-static-assets-alt-url.html.

 Adobe

更快、更輕鬆地獲得協助

新的使用者?

Adobe MAX 2024

Adobe MAX
創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX

創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX 2024

Adobe MAX
創意大會

10 月 14 至 16 日邁阿密海灘和線上

Adobe MAX

創意大會

10 月 14 至 16 日邁阿密海灘和線上