Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Dataobject_manager SortableDataObject::add_sortable_many_many_relation

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: 1335 Views
  • NETim
    Avatar
    Community Member
    24 Posts

    Dataobject_manager SortableDataObject::add_sortable_many_many_relation Link to this post

    Hi,

    Trying to apply drag and drop sort ordering to a site.

    We have Products (DataObject) which have a many_many relationship with CategoryPage(Page types).

    The relationship works fine, apart from sort ordering. We have used the directive:

    SortableDataObject::add_sortable_many_many_relation('CategoryPage','Products');

    To try and add drag and drop sort ordering to the categoryPage administration, so the end user can reorder products in a category.

    When we add the directive to the _config.php, a dev/build shows that the sort order column has been created, but there are no changes in the admin. It appears that the directive is being ignored.

    Any ideas guys?

    T

  • UncleCheese
    Avatar
    4085 Posts

    Re: Dataobject_manager SortableDataObject::add_sortable_many_many_relation Link to this post

    Look closely at the argument signature for that function. The first parameter is the class where many_many is defined, and the second is the name of the many_many relation.

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