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, Ed, biapar, Willr, Ingo, swaiba

Display order - solved

Go to End



Community Member, 130 Posts

24 September 2010 at 8:11am

Edited: 24/09/2010 10:14am

ss - 2.4.0
dom - r414

In my dataobject controller I am using:
static $default_sort = "BannerWeight ASC";

"BannerWeight" is an INT field to weight the sort-order of the data return.

When I enable and use DOM the data is returned in last-in-first-out order, but when I use the default ManyManyComplexTableField the data is returned correctly i.e., in the $default_sort order specified.

This isn't a huge deal, but for consistency sake, I'd like to keep all my data objects controlled by DOM.

Any thoughts? Remove the BannerWeight field and use drag-and-drop sorting?

Edit: I just realized that the DOM adds a sort field that it sorts by. My bad.
I do wonder how you override that. It would be nice to use both, DOM and be able to custom sort.

Edit 2: Just don't add it to the add_sortable_classes in _config.php. Duh!