PathField でアセットのドラッグ&ドロップ機能を有効にする方法

AEM 6.5.10 の更新後に、アセットブラウザーからページエディターの PathField にアセットをドラッグ&ドロップできます。 この機能を有効にするには、  溺れる  プロパティを PathField のノードに設定します。

説明 description

環境

Adobe Experience Manager

問題/症状

AEM 6.5.10 以降では、アセットブラウザーからページエディターの PathField にアセットをドラッグ&ドロップできます。 この機能は、 AEM 6.5.10 リリースノート:

「サイトエディターのパスフィールドを使用すると、作成者はコンテンツファインダーからアセットをドラッグできます。」

この記事では、この機能を有効にする方法を説明します。

解決策 resolution

PathField のノードに「droppable」プロパティを追加します。

name: droppable

  type: Boolean

  value: true

カスタマイズの例:

PathField と droppable=trueを、 WKND チュートリアルの HelloWorld コンポーネントに、

/apps/wknd/components/helloworld/cq:dialog/content/items/column/items/path:

<?xml version="1.0" encoding="UTF-8"?>
    <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
        jcr:primaryType="nt:unstructured"
        jcr:title="Properties"
        sling:resourceType="cq/gui/components/authoring/dialog">
        <content
            jcr:primaryType="nt:unstructured"
            sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
            <items jcr:primaryType="nt:unstructured">
                <column
                    jcr:primaryType="nt:unstructured"
                    sling:resourceType="granite/ui/components/coral/foundation/container">
                    <items jcr:primaryType="nt:unstructured">
                        <text
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
                            fieldLabel="Text"
                            name="./text"/>
                        <path
                            jcr:primaryType="nt:unstructured"
                            sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
                            fieldLabel="Path"
                            droppable="{Boolean}true"
                            name="./path"/>
                    </items>
                </column>
            </items>
        </content>
    </jcr:root>
recommendation-more-help
3d58f420-19b5-47a0-a122-5c9dab55ec7f