Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Can I get the DataObjectManager to behave like the ImageGalleryManager?

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 554 Views
  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Can I get the DataObjectManager to behave like the ImageGalleryManager? Link to this post

    Hello UncleCheese!

    Today I tried to use two DOM:s in the same way you use one DOM and one IGM in the image gallery module.
    Since I'm posting here I obviously failed.

    I've gotten partway there.

    With
    $cityManager->setFilter('CountryID', 'Choose a country', $this->Countries()->toDropdownMap('ID','Title'));

    I get the filter I want but the filter setting isn't used when saving the object. I also tried setting a default value for the filter but I noticed that the select box resets itself everytime you make a choice if you put a value as the last argument in setFilter.

    So the questions:
    1. Can the option No filter be removed like in IGM?
    2. Is the select box supposed to reset when making a choice if the default value is set?
    3. Can the value from the filter box be used when creating new objects just like for the IGM?

    Kindly,
    Marcus

    554 Views
Page: 1
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.