7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Edit attributes (name, title...) after uploading file in AssetManager
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | ||
| Author | Topic: | 1990 Views |
-
Re: Edit attributes (name, title...) after uploading file in AssetManager

12 January 2010 at 12:37pm Last edited: 12 January 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)? -
Re: Edit attributes (name, title...) after uploading file in AssetManager

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.
-
Re: Edit attributes (name, title...) after uploading file in AssetManager

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.
| 1990 Views | ||
| Go to Top |

