Jump to:

7939 Posts in 1472 Topics by 944 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Sorting in NestedDataObjectManager

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: 927 Views
  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Sorting in NestedDataObjectManager Link to this post

    Hi, I've got an ImageDataObjectManager nested in a DOM, but just can't get the images to display in created order (or any specified order for that matter) and cannot get drag&drop on those images either....any ideas out there?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Sorting in NestedDataObjectManager Link to this post

    Can you post the code you're using? What do you mean when you say drag-and-drop isn't working?

  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: Sorting in NestedDataObjectManager Link to this post

    sorry, sorted it out just after I posted that one. Stupid mistake in my _config file that was stuffing it up.

    For the record tho....what is the correct way to specify mulitple sortable classes in _config??

  • UncleCheese
    Avatar
    4085 Posts

    Re: Sorting in NestedDataObjectManager Link to this post

    SortableDataObject::add_sortable_classes(array('Class1','Class2'));

  • NickJacobs
    Avatar
    Community Member
    144 Posts

    Re: Sorting in NestedDataObjectManager Link to this post

    Yep, that explains it, thanks UC

    I was trying to do:
    SortableDataObject::add_sortable_class('Class1','Class2');
    and then dropped back to :

    SortableDataObject::add_sortable_class('Class1');
    SortableDataObject::add_sortable_class('Class2');

    which worked....but not as elegant a solution

    927 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.