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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

ss3 gallery - upload all images at once

Go to End

10 Posts   2023 Views


19 September 2012 at 4:23pm Community Member, 233 Posts


I've been building a few sites with SS3 recently and it's all going fine, apart from one thing.

a page which 'has many' images...

public static $has_many = array(
   'HolidayHomeImages' => 'HolidayHomeImage'


class HolidayHomeImage extends DataObject {

public static $has_one = array(
'Image' => 'Image',
'HolidayHomePage' => 'HolidayHomePage'

I have to create create 'dataobject' separately, clicking 'add', then saving, then attaching image...
needles to say it's time consuming compared to selecting a whole load of images and uploading all together.

I notice in the assets area it's possible, so there must be a way of doing it on my pages too?

Also, when i'm on the page to edit the dataobject details, I get a dropdown to choose the 'HolidayHomePage' eg the has_many relationship. It gets set automatically, but users get confused why it's there. Is there any way to hide it?



19 September 2012 at 8:39pm Community Member, 66 Posts

Hi Futureweb

Have you looked at imagedataobjectmanager? [url][/url]

It has a multiple upload feature and will work with your relationship.

On the other issue, do you want to hide the field completely from the page? You can simply remove the field like so.



19 September 2012 at 10:16pm Community Member, 233 Posts

Hi, the imagedataobject manager doesn't work in SS3 as far as I know... However, that is exactly the result I want to get working ins SS3

I see the same questions is being posed here..

i removed the dropdown from the dataobject edit page with the following with the dataobject php file...

public function getCMSFields() {
      $fields = parent::getCMSFields();
      return $fields;


19 September 2012 at 10:24pm (Last edited: 19 September 2012 10:28pm), Community Member, 66 Posts

Oh right. I'm still using 2.4.7 as another module I wanted to use didn't work with SS3. I haven't used SS3 at all so I can't say with confidence what will or won't work. However, from reading the docs it looks like uploadField has a multiple upload option.

If this isn't what you want you can always ask Uncle Cheese in the DOM forum since he's the creator of ImageDataobjectManager.

Did that code work for the field then? Or is the problem something else entirely?


26 September 2012 at 1:48am Community Member, 5 Posts

Hi Futureweb,

I was looking for a bulk image uploader, too. I asked around the forum but I didn't get any answers, but in StackOverflow someone recommended me to update SilverStripe to 3.0.2 and try with the GridFieldEditingTools module.

Here's my question in SO:

And here's the link to the module:

I didn't try it yet, I'm working on it, please tell me if you try it and works!


29 September 2012 at 11:36pm Community Member, 45 Posts


the GridFieldBulkEditingTools work fine. Used it in combination with SortableGriedField for a simple image gallery extension.

Just try them out, it's fun ;)


15 October 2012 at 10:42am Community Member, 233 Posts

Great - got those working perfectly!

further to that, i wrote a wee article about it

and packaged up the files as a plugin module

thanks to the people who made those two modules it was pretty quick to get a gallery working just as I wanted it!


11 August 2013 at 10:54am Community Member, 1 Post

I'm looking for exactly this.... Wondering if by chance you have a current link for this article or file? The old one seems to be dead.

Go to Top