Hi all We use the openminds simple media module for all our sites, and we do this by means of the simple media dam integration. This is all right, but one thing has been bothering me: All the controls show the same label and description in the dialog, no matter what you set in the dialog configuration.
This is rather annoying, specially if you have dialogs with more than one image. For instance: we sometimes have headers with a background image, and a logo image, and those should be set in the page info dialog. So we have two dam controls both faithfully saying: "select image", which could be a bit confusing for site editors. Today I had some time, and decided to see why this is. So I first put a breakpoint at * net.sourceforge.openutils.mgnlmedia.media.dialog.DialogSelectMedia#init* and followed the call stack up. I found what i was looking for in * info.magnolia.module.templatingkit.dam.dialog.DialogDAM#loadSubs* where all the configured controls for the dam handler are instantiated and added as subs. The config node that is passed in our case is * config:/modules/extended-templating-kit/config/sites/geschiedenis/damSupport/handlers/media/controls/MediaUUID * * * The configuration that was injected into *DialogDam#init* is not used at all. What is slightly surprising to me is that you can register more than one control for a dam handler, especially since controls can have subs, so if you need more than one control for a specific handler, you can wrap it in a container control. A consequence of this architecture is that it is no longer logical to somehow merge the control config that was provided to the init method and the static control config from the dam handler configuration. Yet this is pretty much what i would expect. Until now I had considered this a bug, but now i see this is actually sane behavior, given the choice tho allow more than one control for dam handlers. I now feel inclined towards creating my own extension of DialogDam, and make the following changes: - allow one control only - merge the 'local' control configuration with the 'global' configuration using something like info.magnolia.cms.util.ExtendingContentWrapper I guess there are a few properties you don't want to override, like - controlType - type -... I wonder what you guys at Magnolia think about this. It is a bit weird to show the same label and descripion on all dam controls. Do you feel it's a problem, and would you agree with my solution? regards, Ernst -- Ernst Bunders Ontwikkelaar VPRO ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
