We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18424
    • 6 Posts
    HI and thank you for reading this. I have scoured many tutorials and this forum but can't find my fix.
    I can successfully change the order of my documents (children) in my site tree but the change is not reflecting on my website.
    Example. Parent Document is "News". I have 4 children documents. 1. "last year" 2. "this month" 3. "this week" 4. "today". I want "today" to display at the top of the list on my website. I have modx 1.0.3 Rev 6653
    Note: Drag and drop doesn't change the document order on my website, only in my site tree.
    I hope someone can help with detailed step by step before I finish pulling all my hair out lol.

    This question has been answered by multiple community members. See the first response.

      • 34193
      • 330 Posts
      Are you using wayfinder to generate the navigation if so then using &sortBy and &sortOrder would do the job see http://rtfm.modx.com/display/ADDON/Wayfinder for more info.

      I would do this by setting the Menu Index for each page to get them in the order I want eg today set to 1 , week 2, month 3 and year 4 then set the sortBy to menuindex so the example call would be

      [[!Wayfinder? &startId=`0` &sortBy=`menuindex`]]

        • 34193
        • 330 Posts
        opps just spotted your using evo i thing the call for evo would be

        [!Wayfinder? &startId=`0` &sortBy=`menuindex`!]


        If I remember correctly.
          • 18424
          • 6 Posts
          Hi Pete and thank you so much for your reply. I inserted your code but the document is still showing at the bottom of my list instead of at the top where i want it. I cleared cache but to no avail. I might be doing something wrong. Here is exactly what I did.
          ELEMENTS>MANAGE ELEMENTS>WAYFINDER and changed code so that it now looks like this.
            • 18424
            • 6 Posts
            I tried that too but not working still.
              • 34193
              • 330 Posts
              ok sorry wasn't clear this needs changing in the template not the wayfinder snippet.

              I'm running from memory here not used evo for a while.

              but under elements there should be the site's template edit that. Some where in that code there should be a call to wayfinder and thats what you need to change don't just do a straight swap see what other parameters are set and just add the 2 I have given on if they are not there.

              The only problem is depending on how the site was set up this may also be in a chunk too. Did you set the site up or someone else.
                • 19369
                • 1,098 Posts
                You can choose ascending or descending order with Wayfinder. Add one of these parameters:
                &sortOrder=`ASC` or &sortOrder=`DESC`
                  • 19369
                  • 1,098 Posts
                  @Pete Edley is right, don't modify Wayfinder Snippet directly. The actual code of Wayfinder should be inside a template or a chunk of your website.
                    • 18424
                    • 6 Posts
                    Pete, someone else set up the website. Thank you microcipcip. I'll check my sie templates and chunks and try to find the code and change it. I appreciate this ty.
                      • 18424
                      • 6 Posts
                      I looked in templates and chunks and can't find a reference there to wayfinder. I did find this. Would it have anything to do with a possible fix?
                      Oh and Pete, thanks for the detailed instructions. It helps to ensure that I do it right step by step.