Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Folder Schema missing for Assets

HarishDv
Level 3
Level 3

HI Team ,

I am going through a documentation below.

https://helpx.adobe.com/experience-manager/6-3/release-notes/folder-metadata-schema.html

We are using AEM 6.3 CFP2 . However we do not see this option on the tools section of AEM .

Can you please let me know  how to enable this option .

Thanks

Harish

1 Accepted Solution
Hemant_arora
Correct answer by
Level 8
Level 8

You need to install AEM 6.3.2.0 CFP1 and then the folder metadata schema option will appear

I just did that. Here is the link to download AEM-CFP-6.3.2.1

https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/compani...

IT WORKS AS EXPECTED

1486911_pastedImage_0.png

1486912_pastedImage_1.png

Refer to Folder Metadata Schema

View solution in original post

13 Replies
Hemant_arora
Level 8
Level 8

I believe you are specifically looking for the keyword folder marked in bold in documentation . "folder metadata schema "

I validated the steps mentioned in the document https://forums.adobe.com/external-link.jspa?url=https%3A%2F%2Fhelpx.adobe.com%2Fexperience-manager%2... it works as expected in AEM 6.3.2.0

Correct me if I am wrong and you are not able to see the Metadata Schemas option at all

1486387_pastedImage_1.png

1486511_pastedImage_3.png

HarishDv
Level 3
Level 3

HI Hemant,

Thanks for your response.

I am actually looking to modify the schema of the Asset folders.

Something like adding another column (as shown on the screen shot)

Can you please provide the steps to be followed to do the same.

1486381_pastedImage_0.png

Thanks in advance.

Thanks

Harish

Hemant_arora
Level 8
Level 8

Go to tools-> assets-> metadata schemas

Create a new schema

Edit the Schema

Add columns and custom fields

save the schema.

Now select this newly created schema and select the apply to folder option

select the folder where you want to apply the schema.

click on overwrite and you are done.

Now go to that folder and select any asset , click on properties , you will see the new custom metadata schema form with the custom fields that you defined.

so all existing and new files in that folder will follow the custom schema that you created and applied.

Here is the link for more information Metadata Schemas

1486882_pastedImage_1.png

1486888_pastedImage_4.png

1486886_pastedImage_2.png

HarishDv
Level 3
Level 3

Hi Hemant,

I think you are missing my question .

I don't need a schema on assets. I am looking at adding a custom schema for asset folder. In other words I am trying to add some custom metadata on the sling:orderedFolder Node & NOT on dam:Asset.

Please look at my screen shot above.

Thanks

Harish

Hemant_arora
Level 8
Level 8

oh I understand your question now. Let me check that feature in 6.3.2.0. I was checking that on 6.4

Hemant_arora
Correct answer by
Level 8
Level 8

You need to install AEM 6.3.2.0 CFP1 and then the folder metadata schema option will appear

I just did that. Here is the link to download AEM-CFP-6.3.2.1

https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/compani...

IT WORKS AS EXPECTED

1486911_pastedImage_0.png

1486912_pastedImage_1.png

Refer to Folder Metadata Schema

View solution in original post

HarishDv
Level 3
Level 3

Hi Hemant,

Thanks for the above info.

I just realised i am using the version 6.3.1.2 .

Can you please confirm the package i need to install , on top of this to get this feature ?

Thanks

Harish

Hemant_arora
Level 8
Level 8

First install AEM 6.3 SP2 https://www.adobeaemcloud. https://www.adobeaemcloud.com/content/packageshare/tools/login.html?/content/marketplace/marketplace...

Then install AEM 6.3.2.0 CFP1 https://www.adobeaemcloud.com/content/marketplace/marketplaceProxy.html?packagePath=/content/compani...

Installation of both will do automatic restart. 

Make sure you first do this on local instance.

Do take a backup of repository before installation in case you are doing it on other environment

HarishDv
Level 3
Level 3

Hi Hemant,

There is still an issue here.

The Schema Taxonomy looks like it it applicable for one folder.

The subfolders within this folder do NOT inherit this new schema.

Can we somehow get this applicable to sub folders ?

Thanks

Harish

Hemant_arora
Level 8
Level 8

Yes, its not inherited if there are existing subfolders inside a folder and you apply schema to only the parent folder.

But in case you have already applied schema to a parent folder and you are creating nee subfolders inside the parent then it will ask you to add a metadata schema while creating subfolder.

1487671_pastedImage_0.png

You can add folder metadata schema to subfolders programatically in case you have more number of subfolders.

You will be required to either write a workflow or event listener which will observe whenever a subfolder is created and the parent of which has a specific metadata schema applied, so copy that property to subfolder too.

of if you have less number of subfoders you can directly select the schema and use the option of apply to folder(s)

or

go to crx/de and add the property to the jcr:content node

folderMetadataSchema       /conf/global/settings/dam/adminui-extension/foldermetadataschema/test

or add that to your code and build it.

But yes when you create a new subfolder you will have to select.

I believe inheritance happens in case of assets only and not in folders.

deepalakshmip35
Level 2
Level 2

Hi Hemant,

 

It is really a great explanation on creating a folder metadata and inheriting the folder metadata schema to sub-folders

Now I'm using AEM 6.5.

So still, do we have to create either workflow or event listener to inherit folder schema to subfolders? it won't apply by default as metadata schema works?

 

One more thing I'm trying to maximize the filed width as like the "Folder Title" field of the "Details" tab, but by default folder schema comes with a two-column view.

Is this possible to maximize the field width in folder metadata schema?

 

Hemant_arora
Level 8
Level 8

Here is a sample AEM fiddle script to add foldermetadataschema to subfolders programatically

package apps.acs_002dtools.components.aemfiddle.fiddle;

import com.day.cq.search.*;

import com.day.cq.wcm.api.*;

import com.day.cq.dam.api.*;

import org.apache.sling.api.*;

import org.apache.sling.api.resource.*;

import org.apache.sling.api.servlets.*;

import java.io.IOException;

import javax.jcr.*;

import java.util.*;

public class fiddle extends SlingAllMethodsServlet {

    @Override

    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws IOException {

          // Code here

        //response.getWriter().println("Hello from " + request.getResource().getPath());

        Resource resource = request.getResourceResolver().getResource("/content/dam/AEM63App");

     

Resource res = request.getResourceResolver().getResource(resource.getPath()+"/jcr:content");

ValueMap properties = res.adaptTo(ValueMap.class);

String metaDataSchemaValue = properties.get("folderMetadataSchema", String.class);

response.getWriter().write(""+metaDataSchemaValue);

      

Session session =  request.getResourceResolver().adaptTo(Session.class);

        if (resource != null) {

           if (resource != null) {

Iterator<Resource> linkResources = resource.listChildren();

while (linkResources.hasNext()) {

Resource childResource = linkResources.next();

try{

Node childNode = childResource.adaptTo(Node.class);

childNode = childNode.getNode("jcr:content");

childNode.setProperty("folderMetadataSchema",metaDataSchemaValue);

session.save();

response.getWriter().write(""+childNode.getProperty("jcr:title").getString());

    

}catch(RepositoryException re){}

}

}

            response.setStatus(SlingHttpServletResponse.SC_OK);

        } else {

            response.setStatus(SlingHttpServletResponse.SC_INTERNAL_SERVER_ERROR);

            response.getWriter().write("ERROR");

        }

    }

       

    }

smacdonald2008
Level 10
Level 10

@hemant arora - excellent community interaction - we marked your response as correct!