Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Menu(2) reordering for NewsPage

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

Page: 1
Go to End
Author Topic: 1145 Views
  • Pike
    Community Member
    40 Posts

    Menu(2) reordering for NewsPage Link to this post

    How Can I change sort ordering (Sort='Desc') for Newspage.ss.

    This working after click on "Novinky" ("News") menu item (image good.jpg):

    class Page_Controller extends ContentController {
       public function init() {
          global $project;
          if ( $this->ClassName == 'NewsHolder' || $this->ClassName == 'NewsPage' ) {

    function ChildrenResorted( $field = 'Sort', $so = 'DESC' ) {
        return ( $this->Children()->Count() ? $this->Children()->sort( $field, $so ) : $this->Parent()->Children()->sort( $field, $so ) );

    This not working after click on item on item (normal Sidebar.ss ) under parent menu "Novinky" ("News") (image bad.jpg):
    Items in Sidebar.ss (Children) are sorted by default.
    Why? Where can I resort Menu(2) items before it shows?

    Help me somebody, please?

    Attached Files
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.