Reputation: 47
I created with the help of model manager a custom type for my folders and all I want is to have some sort of popup window to fill all the properties and then spread to all the files inside that folder, Is there any relation with the rules of folders and common metadata fields from content? Any help would be apreciated thx
Upvotes: 0
Views: 198
Reputation: 10538
If you configured a form along with your custom model, you should already have a way to edit the custom metadata on your folders.
If you also want that same metadata on your content, then hopefully you implemented your custom metadata on an aspect. The aspect can be applied to folder instances as well as content instances.
Once you have an aspect applied to the folder and content instances, it sounds like the next thing you want to do is copy metadata values from the folder to the content. There is nothing out-of-the-box that will do this for you. You can do this with a rule.
I suggest reading the documentation on the Alfresco server-side JavaScript API and also installing the Alfresco JavaScript Console add-on. You can create a server-side JavaScript file that will reside in Data Dictionary/Scripts. Then you can set up a rule on your folder to invoke that JavaScript to copy metadata from the folder to the documents when the documents are created.
Keep in mind that if the metadata on the folder changes you will have write a rule to deal with that if you want to copy the updated values to the content instances in the folder. This could get very expensive if the folder grows in size.
Upvotes: 2