7762 Posts in 1289 Topics by 886 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » FDOM $allowUploadFolderSelection question
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 297 Views |
-
FDOM $allowUploadFolderSelection question

20 June 2011 at 4:39pm
I was looking for a way to disable the File Selection in FDOM. I can see that there is
protected $allowUploadFolderSelection = true;
and
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;
} -
Re: FDOM $allowUploadFolderSelection question

25 October 2011 at 5:05am
stumbled upon the same issue. will eventually file a pull request on github
-
Re: FDOM $allowUploadFolderSelection question

9 November 2011 at 1:40pm
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;
$manager->setUploadFolder("Slideshow-Images");
$fields->addFieldToTab("Root.Content.Slideshow", $manager);return $fields;
}
| 297 Views | ||
|
Page:
1
|
Go to Top |



