我想给我的网站的DAM/数字资产的URL映射。尤其是对于PDF。每当我提供PDF的下载链接时,它都会向PDF显示完整的文件夹结构。我想把这个剪短一点。我使用的是AEM 6.2。
发布于 2019-02-17 04:23:31
您也可以在Sling资源解析器出厂配置中进行映射
1. Go to system config manager and search for Sling resource resolver factory.
2. Add new entry "/content/dam/you-project-structure/>/" and "/content/dam/you-project-structure/</" 发布于 2019-02-16 00:20:29
您可以在/etc/map位置下定义URL映射。看看https://sling.apache.org/documentation/the-sling-engine/mappings-for-resource-resolution.html,它包含了这个例子:

在/etc/map下,您可以创建一个文件夹,然后在该文件夹中创建一个包含以下属性的.content.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="sling:Mapping"
sling:internalRedirect="/content/dam/the/full/path/to/your/file.pdf"
sling:match=".+/content/short-url.pdf"/>https://stackoverflow.com/questions/54704262
复制相似问题