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.

Customising the CMS /

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

want to upload as many as Images

Go to End

4 Posts   1270 Views


Community Member, 41 Posts

30 April 2011 at 10:49am

I want to create a tab at CMS side that admin can upload as many as image file he wants to
Are there any tutorial I can follow?

How can I set up db?, relationship??

	static $db = array();

       static $has_one = array();

      static $has_many = array();

also this part

  function getCMSFields() {
        $fields = parent::getCMSFields();
		 $fields->addFieldToTab("Root.Content.UploadImage", new ImageField('img', 'Image Upload'));	
        return $fields;


Forum Moderator, 5521 Posts

30 April 2011 at 7:41pm

You would need to setup a has many relationship. To add an undefined number of images you could try the Has many file manager ( not sure if that works with the latest version though. You could also take some ideas from this tutorial -


Forum Moderator, 1848 Posts

3 May 2011 at 11:01pm


Community Member, 70 Posts

5 May 2011 at 10:56pm

hi leafchild

I'm currently working on something that sounds similar, namely a gallery containing photographs (which themselves contain an Image file). I've added a bulk upload tab which is working other than the left hand menu not updating. Still work in progress so please only install on a test site in the first instance