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

Dataobject_manager SortableDataObject::add_sortable_many_many_relation


Reply


2 Posts   1445 Views

Avatar
NETim

Community Member, 24 Posts

15 April 2013 at 11:10pm

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

Avatar
UncleCheese

Forum Moderator, 4096 Posts

18 April 2013 at 12:45am

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.