Jump to:

7940 Posts in 1543 Topics by 946 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Display order - solved

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: 725 Views
  • prawnstar
    Community Member
    116 Posts

    Display order - solved Link to this post

    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!


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.