页面属性中的AEM页面图像未应用sling:resourceType [英] AEM Page Image in Page Properties Doesn't Apply a sling:resourceType

查看:153
本文介绍了页面属性中的AEM页面图像未应用sling:resourceType的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Adobe Experience Manager 5.6.1(AEM)(以前称为CQ5)我试图创建一个与页面属性中的图像选项卡相似的新选项卡。它的标题为徽标。

Using Adobe Experience Manager 5.6.1 (AEM) (Formerly CQ5) I am trying to create a new tab similar to the Image tab in Page Properties. It would be titled "Logo".

我基本上只是复制了Image标签来创建徽标标签,并重命名了反映徽标目的的路径。例如,我将 fileReferenceParamater 设置为。/logo / fileReference requestSuffix /logo.img.png

I basically just copied the Image tab to create a logo tab and renamed the paths to reflect the logo purpose. For instance, I set the fileReferenceParamater to ./logo/fileReference and requestSuffix to /logo.img.png.

编辑属性时,可以将像在图像选项卡中一样,将图像添加到选项卡中,但是,图像永远不会出现在该位置。我猜这是因为默认图像处理程序没有处理请求。错误是:

When I edit the properties, I can drag an image into the tab just as I can with the "Image" tab, however, the image never appears there. I am guessing this is because the default image handler is not picking up the request. The error is:


无法将请求提供给
/ content / my-site / home-page / en_us / jcr:content
中的/logo.img.png org.apache.sling.servlets.get.DefaultGetServlet

Cannot serve request to /content/my-site/home-page/en_us/jcr:content/logo.img.png in org.apache.sling.servlets.get.DefaultGetServlet

内容节点中没有 sling:resourceType 。当我添加 foundation / components / adaptiveimage 的资源类型时,它就起作用了。但是,我注意到 Image节点没有 sling:resourceType 。我想基础页面中的 img.png.java servlet正在处理该请求。

When I looked at the content node there was no sling:resourceType. When I added a resource type of foundation/components/adaptiveimage then it worked. However, I noticed that the "Image" node didn't have a sling:resourceType. I guess the img.png.java servlet in the foundation page is handling that request.

我尝试在页面组件中创建 logo.img.png.jsp 文件来处理请求,但是

I tried creating a logo.img.png.jsp file in my page component to handle the request, but that didn't seem to work.

如何获取AEM来添加 sling:resourceType

How can I get AEM to either add the sling:resourceType or to handle the request?

推荐答案

我遇到了类似的问题,并且找到了更简单的解决方法。您需要做的就是在徽标图像下添加 hidden xtype,如下所示:

I was facing the similar problem and I found a simpler way to resolve. All you need to do is to add a hidden xtype under the your logo image as below:

<yourlogo
    jcr:primaryType="cq:Widget"
    <-- other properties -->
    xtype="html5smartimage">

    <items jcr:primaryType="cq:WidgetCollection">
        <resType
            jcr:primaryType="cq:Widget"
            ignoreData="{Boolean}true"
            name="./logo/sling:resourceType"
            value="foundation/components/image"
            xtype="hidden"/>
    </items>

</yourlogo>

这篇关于页面属性中的AEM页面图像未应用sling:resourceType的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆