Hi Edgar,

What you describe is possible. We have done something similar.

In order to modify the right-click-menu, you need to look at the class 
"info.magnolia.module.dms.WorkflowDMSAdminTreeConfig", in particular the method 
prepareContextMenu(). You can create a class that extends this class, and 
overrides the prepareContextMenu() method to insert your own items.
You can configure the tree to use your new configuration class under 
config->/modules/dms/trees/dms

I would then create a context-menu item that is active for the node-type 
"mgnl:content" which corresponds to the "folders" in DMS. The menu-item would 
simply open a dialog, which you can configure in the normal way. It is no 
problem storing properties to a mgnl:content node in DMS from any normal 
dialog. (I think you can even try it out just by opening a dialog, copying the 
URL into a new browser window, and modifying the mgnlRepository and mgnlPath 
parameters in the URI.)

To implement the second requirement, "smart" upload dialogs, you will need to 
subclass either the dialog class "info.magnolia.module.dms.DocumentDialog", or 
one or more of the controls in it.
Within the dialog class or the control classes, you can use normal methods to 
load the content from the parent folder in DMS, check the properties and react 
accordingly, for example by not outputting the control, or dynamically adding 
some more controls.
You can configure the document upload dialog under 
config->/modules/dms/dialogs/dmsEdit .

A slightly unfortunate point is that if you do all  this for magnolia 4.4 or 
4.5 you will probably have to do it again when 5.0 comes out, and the backend 
GUI technology changes to Vaadin.

Regards from Vienna,

Richard





-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Edgar Vonk (via Magnolia Forums)
Gesendet: Donnerstag, 02. August 2012 13:44
An: Magnolia User List
Betreff: [magnolia-user] Managing metadata for folders in the DMS

Hi,

It is possible to define a custom dialog and change the default right mouse 
menu for folders in the DMS module (or Data module for that matter) so that a 
content editor can manage 'folder metadata' (JCR node properties) in the DMS 
module?

How would I go about doing this? Has this been done before? In the end the DMS 
module is 'just' another JCR repo and the functionality I am looking for is in 
a rough form already there in the JCR browser so it must be possible I guess. 

And related: we want to use this DMS folder metadata to offer 'clever' dialogs 
in the DMS when the content editor uploads a new document. At the moment there 
is just one (customized) "upload document" dialog in the DMS. However we would 
like this dialog to dynamically adjust itself (show less/more settings etc) 
depending on the meta data of the parent folder(s). Does anybody have 
experience with this or an idea how to do this?

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=0e8e382a-c5b8-4485-a3e9-1b988f82ab06


----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------





----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to