Jump to:

3375 Posts in 999 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Use of $default_sort

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

Page: 1
Go to End
Author Topic: 3128 Views
  • Juanitou
    Avatar
    Community Member
    322 Posts

    Use of $default_sort Link to this post

    Hi!

    I don’t understand why $default_sort is working in a DataObject I created but not in a ArticlePage (redefinition of Page). In the forum there are other people complaining about that. I know I can use a custom function to sort these pages, But I’m wondering if this is a bug or not…

    Regards,
    Juan

  • Juanitou
    Avatar
    Community Member
    322 Posts

    Re: Use of $default_sort Link to this post

    I think I’ve found it: when you duplicate a page (because of the interest of repeating some content or structure), the new page has the same Sort value as the original. Changing it in the database or moving around the page in the CMS are solutions.

    That’s a bug, isn’t it?

  • kuenkuen82
    Avatar
    Community Member
    41 Posts

    Re: Use of $default_sort Link to this post

    could you share what is your custom sort function? I'm having a problem with default sorting the pages

    static $default_sort = "Date DESC";

    3128 Views
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.