March 30, 2020
Estimated Post Reading Time ~

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 the below concepts:
  • I have tried to do that using Resource Merger, but it didn’t work.
  • After that, I have tried the 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 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 the 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 in conf 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 the above problem.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.