cancel
Showing results for 
Search instead for 
Did you mean: 

Add additional folder properties

pmverma
Champ in-the-making
Champ in-the-making
Hi all,
I like to add custom properties for folder in document details page. I like to add something like.

Name: Khwaben
Title: (None)
Description: Khwaben of mine
Size: 10 MB
Sub-File: 3 files 


I google and I find Jeff article of extending person properties. http://ecmarchitect.com/archives/2012/02/27/1555
So, i tried something like this. I extends in share-config-custom.xml and do other. But my problem is its implementation,in which java file do I need to add my custom properties. I trace and also google for the actual implementation file, but I do not found any clue how to extend folder metadata.
For eg,in above person case, Jeff has uses SlingshotUserFactory.
I am really glad to say Thanks if someone give me just a clue to this.

Thanks in advance.
P. M. Verma
2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator
Extending the folder with custom properties shouldn't be as difficult as extending the person object.

In fact, it really isn't any different than extending cm:content or creating your own custom aspect and adding it to the folder.

Try creating a custom aspect with those two properties and adding it to a folder. Use the share-config-custom.xml to configure the fields that are displayed for cm:folder. If you need help doing that, look at the custom content types tutorial on ecmarchitect.com.

Once you get your custom properties displaying properly you can move on to how those properties are calculated. It looks like you want to count the files in a folder and also keep track of the total size of the files in a folder. There are multiple ways to do that, but one way would be to create a behavior bound to your custom aspect that is triggered when children are added. The behavior can calculate the stats and store them in the custom properties you defined in the previous step. Realize this could get very expensive and time consuming if you do it in enough folders and if the folders grow large.

If you need help writing a behavior, look at the behavior tutorial on ecmarchitect.com.

Jeff

kevinnason
Champ in-the-making
Champ in-the-making
is there something special that needs to be done to get custom properties to show up in a unqualified search? I have qualified the fields in the search.get file but still I have to fully qualify my custom folder fields to get them to show up.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.