Thursday, June 28, 2018

AEM 62 Add Multifield to Assets Metadata Schema Editor

AEM 62 Add Multifield to Assets Metadata Schema Editor


Goal


This post is a no-code simple hack method to add multifield (with pathbrowser) to metadata schema editor

Package Install

Solution


1) To add a metadata field to the image/jpeg editor; access jpeg metadata schema editor

http://localhost:4502/mnt/overlay/dam/gui/content/metadataschemaeditor/schemadetails.html/default/image/jpeg?formPath=/conf/global/settings/dam/adminui-extension/metadataschema

2) Drag a Text Field with label Related Images mapping to the property ./jcr:content/metadata/relatedImages in new tab, here EAEM



3) Saved in CRX eg. /conf/global/settings/dam/adminui-extension/metadataschema/default/image/jpeg/items/tabs/items/tab4/items/col1/items/1474558552884



4) Manually, change the saved metadata field to multifield (with pathbrowser) - granite/ui/components/foundation/form/multifield

<_x0031_474558552884
jcr_primaryType="nt:unstructured"
sling_resourceType="granite/ui/components/foundation/form/multifield"
fieldLabel="Related Images"
renderReadOnly="true">
<granite:data
jcr_primaryType="nt:unstructured"
metaType="text"/>
<field
jcr_primaryType="nt:unstructured"
sling_resourceType="granite/ui/components/coral/foundation/form/pathbrowser"
name="./jcr:content/metadata/relatedImages"/>
</_x0031_474558552884>





4) The user can now select multiple paths saved to jpeg image metadata eg. /content/dam/geometrixx-outdoors/activities/snowboarding/PDP_1_c05.jpg/jcr:content/metadata/relatedImages





visit link download