Different metadata for different asset category | Community
Skip to main content
Level 4
October 16, 2015
Solved

Different metadata for different asset category

  • October 16, 2015
  • 4 replies
  • 951 views

Hi,

We have a requirement that depending on the category of the asset , a list of metadata needs to be applied to that asset ( eg, marketing asset have a different set of metadata than product asset )

Is it possible to achieve the same with AEM asset metadata schema or somehow else?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

One way is define all the fields & then control with acl.

Alternative for classic ui is using a listener on the particular field you want to hide and then hide the field based on the path. To do this, create a listeners node of type nt:unstructured under the field  (e.g. /apps/dam/content/asseteditors/image/jpeg/formitems/person/listeners) and set the beforeloadcontent property something like:
function(f, r, p) { if (p.indexOf("/content/dam/geometrixx/") == 0) { f.hide(); } return true; }
This will hide this field for assets under /content/dam/geometrixx. You could adjust this to meet other requirements.

Tryout Apply same principal to touch ui but never tried personally.

4 replies

smacdonald2008
Level 10
October 16, 2015

There is quite a lot of documentation on this subject in the CQ docs. See this topic:

http://docs.adobe.com/docs/en/cq/current/dam/metadata_for_digitalassetmanagement.html

sumitc22Author
Level 4
October 16, 2015

Hi Scott,

Looking for a little different thing.Need to define 2 kinds of asset ( lets say both having MIME type jpeg), but having different metadata schema.

Is it possible?

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

One way is define all the fields & then control with acl.

Alternative for classic ui is using a listener on the particular field you want to hide and then hide the field based on the path. To do this, create a listeners node of type nt:unstructured under the field  (e.g. /apps/dam/content/asseteditors/image/jpeg/formitems/person/listeners) and set the beforeloadcontent property something like:
function(f, r, p) { if (p.indexOf("/content/dam/geometrixx/") == 0) { f.hide(); } return true; }
This will hide this field for assets under /content/dam/geometrixx. You could adjust this to meet other requirements.

Tryout Apply same principal to touch ui but never tried personally.

sumitc22Author
Level 4
October 16, 2015

Thanks Sham,

Will try that approach.