So aktivieren Sie die Drag-and-Drop-Funktion für Assets in PathField
Nach der Aktualisierung von AEM 6.5.10 ist es möglich, Assets aus dem Asset-Browser per Drag-and-Drop in ein PathField im Seiteneditor zu ziehen. Um die Funktion zu aktivieren, fügen Sie die ablegen -Eigenschaft zum Knoten von PathField.
Beschreibung description
Umgebung
Adobe Experience Manager
Problem/Symptome
Ab AEM 6.5.10 können Sie ein Asset aus dem Asset-Browser in ein PathField-Element im Seiteneditor ziehen. Diese Funktion entspricht der folgenden Zeile in AEM 6.5.10 - Versionshinweise:
"PathField im Sites-Editor ermöglicht es Autoren, Assets aus der Inhaltssuche zu ziehen."
In diesem Artikel wird erläutert, wie man diese Funktion aktiviert.
Auflösung resolution
Fügen Sie die Eigenschaft "dropped"zum Knoten von PathField hinzu.
name: droppable
type: Boolean
value: true
Anpassungsbeispiel:
Ein PathField mit droppable=true
wurde zur Komponente "HelloWorld"des WKND-Tutorials hinzugefügt, wie
/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>