We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24322
    • 7 Posts
    Hello. I’ve been searching for a solution to this problem but I did not find any info on the topic.

    Problem:
    I need to be able to change the order in which the documents are shown in a folder.

    Example:
    I have a folder named News with the following structure:
    News:
    -- News 1
    -- News 2
    -- News 3
    -- News 4

    I need to be able to rearrange this and have
    News:
    -- News 2
    -- News 4
    -- News 1
    -- News 3

    How can I do this?

    Any help will be greatly appreciated.

    Thank you!
      • 33337
      • 3,975 Posts
      Zaigham (aka zi) Reply #2, 20 years ago
      There is a "menu index" field, adjust the menu index accordingly, you will find this field while editing the document.

      Hope this helps.

      regards.

      zi
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 24322
        • 7 Posts
        Thank you for your reply but it does not work. Anybody has any ideas?

        Thank you!
          • 30223
          • 1,010 Posts
          roblem:
          I need to be able to change the order in which the documents are shown in a folder.

          I’m assuming you want to do this in the front end (teh website) and not in the manager, yes? Basically what zi is saying is the way to do it but you may have to set some parameters differently in the menu snippet. What (snippet) do you use to build the menu?
            • 25663 MODX Staff
            • 12,272 Posts
            Are you talking about the manager or the front end? If the front end, what are you using to build the list? If the Manager, you need to change the sorting option using the icons above the tree menu.
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 24322
              • 7 Posts
              Thank you for the quick replies. Very much appreciated!

              I use DropMenu
              and I use this to show the menu:
              [[DropMenu? &menuName=`topMenu` &startDoc=`0` &levelLimit=`1` &topnavClass=`topMenubar` &here=`activeLink`]]


              The main priority is to be able to change the order of the menu items in the front end. But it would be much better to be able to see the changes in the manager as well.

              Thanks again.
                • 25663 MODX Staff
                • 12,272 Posts
                You can do both. For the manager, use the sort icon above the tree.

                For the front end, I’d highly recommend switching over to Wayfinder, as DropMenu has been deprecated and will likely not receive any more attention from the core team, although it certainly works for many people! smiley
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 30223
                  • 1,010 Posts
                  Hmm, DropMenu by default should sort the menu by the menuindex field but you can try adding &orderBy=`menuindex` to your snippet call and see if this makes a difference.

                  Well, and there’s offcourse Ryans suggestion, who just beat me to it grin
                    • 24322
                    • 7 Posts
                    Thanks a LOT for your suggestions. I will look into it!