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

Sortable data object breaks silverstripe


Go to End


1199 Views

Avatar
Bronwyn

Community Member, 22 Posts

22 March 2012 at 2:02pm

Edited: 22/03/2012 2:02pm

Hi, I have an Awards object which has a many to many relationship to a staffpage, and a many to one relationship to an awardsholder. I am trying to make the object sortable, but whenever I put either of:
(from http://www.ssbits.com/snippets/2010/a-data-object-manager-cheatsheet/)

SortableDataObject::add_sortable_class('AwardObject');

SortableDataObject::add_sortable_many_many_relation("StaffPage", "AwardObject");

in mysite/ _config.php, it breaks the site when I rebuild it. Any help much appreciated.