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

FDOM $allowUploadFolderSelection question


3 Posts   748 Views


20 June 2011 at 4:39pm Community Member, 165 Posts

I was looking for a way to disable the File Selection in FDOM. I can see that there is

protected $allowUploadFolderSelection = true;


public function allowUploadFolderSelection()
   $this->allowUploadFolderSelection = true;

However there is not way aside from setting $allowUploadFolderSelection = false; to disable the Folder Selection interface. It would seem that at least on a per instance basis there is no way to disable the Folder Selection on FDOM or IDOM. Of course there may be something I am missing here but shouldn't the function be

public function disableUploadFolderSelection() {
   $this->allowUploadFolderSelection = falsel;


25 October 2011 at 5:05am Community Member, 126 Posts

stumbled upon the same issue. will eventually file a pull request on github


9 November 2011 at 1:40pm Community Member, 190 Posts

This seems to work for me:

   function getCMSFields() {
      $fields = parent::getCMSFields();
      // Slideshow
      $manager = new ImageDataObjectManager(
         $this,             // Controller
         'Slideshow',       // Source name
         'SlideshowImage',    // Source class
         'Attachment',       // File name on DataObject
         array(             // Headings
         'getCMSFields_forPopup' // Detail fields (function name or FieldSet object)
         // Filter clause
         // Sort clause
         // Join clause

      $manager->allowUploadFolderSelection = false;
      $fields->addFieldToTab("Root.Content.Slideshow", $manager);

      return $fields;