代码之家  ›  专栏  ›  技术社区  ›  jedatu

在AEM的一个对话框选项卡上可以显示多个智能图像X类型吗?

aem
  •  4
  • jedatu  · 技术社区  · 12 年前

    Adobe Experience Manager(AEM)(CQ5)中的开箱即用(OOTB)页面财产对话框提供了一个图像选项卡。我想在对话框中再添加几个图像,但我不想为每个图像创建单独的选项卡。

    例如,有没有办法将“高级”选项卡上的图像包含在对话框集合中?我试过这个,但看起来效果不太好。

    我正在考虑的一件事是扩展幻灯片的xtype,每个图像都将是一个单独的“幻灯片”

    有更好的方法吗?

    1 回复  |  直到 12 年前
        1
  •  10
  •   Tuna Valknut    10 年前

    它是 可能的 拥有多个 smartimage 选项卡上的x类型!

    的小工具API文档 smartimage :

    请注意,该组件主要设计用于单独的 对话框选项卡。您可以在 CQ.Ext.layout.FormLayout(可选),如果您提供 合适的高度 背景 .

    以下是对话框的代码:

    <?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
        jcr:primaryType="cq:Dialog"
        height="{Long}600"
        title="dialog"
        xtype="dialog">
        <items
            jcr:primaryType="cq:Widget"
            xtype="tabpanel">
            <items jcr:primaryType="cq:WidgetCollection">
                <panel
                    jcr:primaryType="cq:Panel"
                    title="Panel with two Images">
                    <items jcr:primaryType="cq:WidgetCollection">
                        <firstimage
                            jcr:primaryType="cq:Widget"
                            cropParameter="./firstimage/imageCrop"
                            ddGroups="[media]"
                            fieldLabel="first image field"
                            fileNameParameter="./firstimage/fileName"
                            fileReferenceParameter="./firstimage/fileReference"
                            height="{Long}200"
                            name="./firstimage/file"
                            rotateParameter="./firstimage/imageRotate"
                            title="First Image"
                            width="{Long}200"
                            xtype="html5smartimage"/>
                        <secondimage
                            jcr:primaryType="cq:Widget"
                            cropParameter="./secondimage/imageCrop"
                            ddGroups="[media]"
                            fieldLabel="second image field"
                            fileNameParameter="./secondimage/fileName"
                            fileReferenceParameter="./secondimage/fileReference"
                            height="{Long}200"
                            name="./secondimage/file"
                            rotateParameter="./secondimage/imageRotate"
                            title="secondimage"
                            width="{Long}200"
                            xtype="html5smartimage"/>
                    </items>
                </panel>
            </items>
        </items>
    </jcr:root>
    

    结果如下: dialog with two images in single tab

    推荐文章