Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, biapar, Willr, Ingo, swaiba, simon_w

Edit attributes (name, title...) after uploading file in AssetManager


Go to End
Reply


11 Posts   2480 Views

Avatar
theAlien

Community Member, 131 Posts

12 January 2010 at 12:37pm

Edited: 12/01/2010 12:37pm

OK, thanks...
I'll go through the code conscientiously.

But... to be sure I'm expecting the right behaviour:

Does it only enable the has_one deleting of images
or does it also provide a way to edit the file-attributes from within the dataobject (which is presently my main concern)?

Avatar
UncleCheese

Forum Moderator, 4094 Posts

12 January 2010 at 2:03pm

Well, you won't be editing the attributes directly. The attributes are stored in the DataObject that contains the File. So instead of:

<% control MyFiles %>
$URL $Title $Description
<% end_control %>

It will be

<% control MyFileObjects %>
$Title $Description $AltText ... whatever you choose
$File.URL
<% end_control %>

So it's the same thing, you're just storing the attributes on a different table, and they can be anything you want.

Avatar
theAlien

Community Member, 131 Posts

13 January 2010 at 2:39am

Thanks, that's what I thought...

I guess I have to re-think my sitestructure.
I was hoping to use the power of the files&images-tab for the main-administrator and some custom uploadforms like subclasses of filefield or the filedataobjectmanager for the regular administrators. But let them both be able to edit at least the copyright-notice (a field added by dataobjectdecorator - since the copyright are quite important when using creative commons-images).

Since it seems not to be possible (or quite difficult) to edit the file-data anywhere else than in the files&images-tab, I guess I have to (1) follow you're route, (2) create a custom tab with datamodel and (3) in the mean time close the files&images-tab for all types of administrators.

Go to Top