Jump to:

7939 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » DOM FIleDataObjectManager Issue

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 1315 Views
  • UncleCheese
    4085 Posts

    Re: DOM FIleDataObjectManager Issue Link to this post

    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.

  • glenn
    Community Member
    3 Posts

    Re: DOM FIleDataObjectManager Issue Link to this post

    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)

  • Peter_SS
    Community Member
    19 Posts

    Re: DOM FIleDataObjectManager Issue Link to this post

    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.

Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.