We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4834
    • 4 Posts
    Hello,

    We have been using MODx CMS for the last few years in our website celextel.org.

    Recently, after updating to the latest version or so, Sorting of Tree and DropMenu is not working. Sorting by dafaul is menuindex. But they are being sorted by menu id. We are unable to sort either the Tree or DropMenu by menuindex.

    Kindly guide us as to what we should do in this regard.

    Thanking you,

    Lakshmanan S.
      Lakshmanan S.
      • 22797
      • 134 Posts
      The latest version of MODx, 0.9.6.1B seems to have lost some of the default sorting ability in the menu tree. I went in and hard coded the default sort order in the file manager/frames/nodes.php

      I changed lines 74-80 to look like this:

      if (!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) {
      		// This is the first startup, set default sort order
                      // I added "isfolder DESC"
      		$_SESSION['tree_sortby'] = 'isfolder DESC, menuindex';
      		$_SESSION['tree_sortdir'] = 'ASC';
      	}
      	// I added 'pagetitle' at the end
      	$orderby = $_SESSION['tree_sortby']." ".$_SESSION['tree_sortdir'].', pagetitle';
      


      This is something that I hope is remedied in future versions.
        • 4834
        • 4 Posts
        Quote from: paulb at Feb 26, 2008, 04:17 PM

        The latest version of MODx, 0.9.6.1B seems to have lost some of the default sorting ability in the menu tree. I went in and hard coded the default sort order in the file manager/frames/nodes.php

        I changed lines 74-80 to look like this:

        if (!isset($_SESSION['tree_sortby']) && !isset($_SESSION['tree_sortdir'])) {
        		// This is the first startup, set default sort order
                        // I added "isfolder DESC"
        		$_SESSION['tree_sortby'] = 'isfolder DESC, menuindex';
        		$_SESSION['tree_sortdir'] = 'ASC';
        	}
        	// I added 'pagetitle' at the end
        	$orderby = $_SESSION['tree_sortby']." ".$_SESSION['tree_sortdir'].', pagetitle';
        


        This is something that I hope is remedied in future versions.

        Hello,

        Thanks for this post. After our recent upgradation, everything is working fine now.

        Thanks,

        Lakshmanan S.
          Lakshmanan S.