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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Sortable data object breaks silverstripe


Reply


542 Views

Avatar
Bronwyn

Community Member, 20 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.