Tuesday, February 21, 2017

Override/Overlay Dam Asset Metadata in AEM 6.2

Use Case: Recently I have gone through a scenario. In which i want to change the dam asset properties and want to add a new widget as well.

This image depicts the default touch ui dialog available for dam asset properties. Now I want to change/add a rootPath for tags so that i can select tags from specific hierarchy only.

This Default dialog comes from “/libs/dam/content/schemaeditors/forms/default”. But According  to the AEM Best Practice we never do any change in /libs hierarchy.

sample.JPG
Fig: DAM Asset Property Dialog

Now I thought about below concepts:
  • I have tried to do that using Resource Merger, but it didn’t work.
  • After that I have tried same using Overlay the complete hierarchy in /apps but it also didn’t work.

Solution:
In AEM 6.2 the correct way to do this is through  "metadata schema".To add/change the properties for a dam asset properties, use a custom metadata schema form or modify an existing form. So I decided to go for modifying an existing form.

Below Steps we need to follow:
Step 1: Go to Projects.html  .
Step 2: Click on Adobe Experience Manager
Step 3: Go to Tools and click on Assets.
Step 4: Click on Metadata Schema
Step 5:  Select Default and go to edit.
Step 6: In this Edit Form, you can see all the fields available in metadata dialog.

overlay.PNG

Fig: Modifying Existing Form
Step 7: In the url query parameter , you can see "formpath=/conf/global/settings/dam/adminui-extension/metadataschema"

Now just change some title in dialog suppose test title and check it in the same path.

crx.PNG
Fig: Add/Change Properties inConf Hierarchy in CRX

Now i just add the property rootPath in my tags node and when i go for any image /asset metadata.
I am able to see the title to Test Title.

dialog.PNG
Fig: Updated Dialog After Modification

And when i  click on tags ,I can find tags  available under /etc/tags/forum.

Capture.PNG
Fig: Updated the root path for Tag widget

So This was the solution of above problem.

If you have any query or suggestion then kindly comment or mail us at sgaem.blog02@gmail.com.

Hope it will help you guys !!👍
Thanks and Happy Learning 😊

.

14 comments:

  1. Really appreciating. Keep it up guys. Best of luck.

    ReplyDelete
  2. pls let me know the code or tips for fetch the multicompositefield value in jsp page.

    ReplyDelete
  3. One update here is you are still changing in "default" which will change for all assets, instead you can create your own company folder parallel to default and make changes there.

    ReplyDelete
    Replies
    1. Hi Raja,

      It is just a demo for explaining the concept. You can customize as per your need.

      Thanks

      Delete
  4. It’ll be great if you’d start with creating a custom namespace for sensitive metadata that we dont want to persist in the file as a best practice.
    - Roger Yumnam

    ReplyDelete
  5. Thanks, do we know how to limit the size of image upload. That was a known bug in aem before.

    ReplyDelete
  6. How can i do it in AEM 6.3 as I can't find anything under settings in my CRX console.

    ReplyDelete
  7. Thank you for the article.I have below questions, Could you please check once.

    1. Is the best practice we need to copy default meta data schema and add our own properties to the custom schema ?

    2. If yes, Is there any way we can extend default schema instead of copying and adding our own properties so that in future we don't have to copy the new changes from the future releases?

    3. Also i can see large set of nodes are added under /conf/global/settings/dam/adminui-extension/metadataschema folder if we do customization. I know we need to add this /conf/global/settings/dam/adminui-extension/metadataschema folder path to our project to deploy in each environment. Is there any best practice around it ?

    ReplyDelete
  8. I have only /conf/global/settings/workflow, nothing else inside settings. Also its picking it from /libs/dam/content/schemaeditors/forms/default/items/tabs/items/tab1/items/col1/items/title.
    I want to change this title field name in AEM 6.4.
    In 6.1 its working fine.

    ReplyDelete
    Replies
    1. Hi Abhishek,

      First you go in this console http://localhost:4502/mnt/overlay/dam/gui/content/metadataschemaeditor/schemadetails.html/default?formPath=/conf/global/settings/dam/adminui-extension/metadataschema&pickable=

      and change something here.Then your hierarchy will get created and you can change there.

      Delete