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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

DOM FIleDataObjectManager Issue


Go to End


11 Posts   2111 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

15 June 2010 at 4:26am

If it's showing you a global view of all your objects, you've set up your model wrong. It should only show those related to the current page.

Avatar
glenn

Community Member, 3 Posts

15 June 2010 at 11:33am

I think this should solve your problem.

static $has_many = array(
'NurseCredentials' => 'NurseCredential' );
NurseCredentials :
static $has_one = array (
'Attachment' => 'File',
'Nurse' => 'Nurse',
'Parent' => 'Page
);

Add the last bit, with the parent. SS should automatically associate that dataobject to the parent page, and will then be filtered automatically by the dataobject_manager module (or a complex_table field for that matter)

Avatar
Peter_SS

Community Member, 19 Posts

16 June 2010 at 7:05am

Hi glenn, thanks for the reply but 'Parent' => 'Page doesn't work. however i noticed that in http://doc.silverstripe.org/modules:dataobjectmanager it says "The primary difference between a FileDataObjectManager and a standard DataObjectManager is that its focus is on the File object related to the DataObject. By default, all the records in a FileDataObjectManager are displayed in a grid view, each represented by an icon of its related File object." but it displayed all files that are already uploaded when creating a new record.

Go to Top