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

    I have wayfinder installed (on Modx Evolution) and it appears to be working, but i have a small issue which is that it is displaying the list of menu options based on their Page Number rather than the order i list them in. (im sure im being stupid and missing something smiley )

    the line of code im trying to change is this

    [[Wayfinder? &startId=`0` &level=`1` &includeDocs=`1,19,145,146,147` &outerTpl=`topnav.outerTpl` &rowTpl=`topnav.rowTpl` &firstClass=`first`]]


    I would like to change it so that its like this

    [[Wayfinder? &startId=`0` &level=`1` &includeDocs=`1,145,146,19,147` &outerTpl=`topnav.outerTpl` &rowTpl=`topnav.rowTpl` &firstClass=`first`]]


    but for some reason when i change the order of the includeDocs it doesnt change the display on the site itself even though the code itself is in the right order.

    the idea is to move the "contact us" link (19) to the second from last option

    Im sure there is another file somewhere which is causing the issue, or a setting somewhere which i've completely missed

    All the best

    Stuart

    (and I apoligise if i have left out any of the basic information, this is my first post on the forums )



    [ed. note: stuartn last edited this post 14 years, 8 months ago.]
      • 33968
      • 863 Posts
      You could try the &sortBy and &sortOrder fields to accomplish this. I can't remember if there is a menuindex field in Evo, but that would be a good one to sort by here.

      [[Wayfinder? &sortBy=`menuindex` &sortOrder=`ASC` ... ]]
      


      Have a look in the docs for more info:
      http://rtfm.modx.com/display/ADDON/Wayfinder#Wayfinder-GeneralParameters
        • 38541
        • 5 Posts
        Hi

        thanks for the reply

        that does seem like the best solution (but thats pretty much what its doing automatically) if going down that route i would need to change the menuindex number for each of the pages

        The only concern i have on this is if i change the menuindex for each of the pages would that break the links in other areas of the site to those pages? (or is modx smart enough to update all the links automatically?)

        All the best

        Stuart

        p.s that link is really useful Thanks smiley
          • 33968
          • 863 Posts
          It won't break anything, if you clear the site cache the menu will be rebuilt on every page.

          It might be a good idea to step up the menuindex in increments of 5-10 so that you can easily slot a page in between if you need to in future without having to re-number everything (eg. 5, 10, 15, 20...)
            • 38541
            • 5 Posts
            Thanks lucas, its always useful to have knowledgeable people around to help out and the increments is a cracking idea.

            I'll let you know how i get on.

            All the best

            Stuart
              • 38541
              • 5 Posts
              Hi again,

              I've just tried that and for some reason the menu just wont change lol (it always seems to happen to me ) but its the end of the day now so i'll look again with a fresh head tomorrow and see if i can spot anything silly.

              Thanks for the help again (the logic makes perfect sense so im sure it is something im doing wrong, probably a case sensitive character out of place somewhere.)

              hope you have a cracking evening.

              All the best

              Stuart
                • 33968
                • 863 Posts
                Did you clear the site cache? Otherwise you can try temporarily calling the snippet uncached and see how it generates on the fly:
                [!Wayfinder ... !]
                
                  • 38541
                  • 5 Posts
                  Hi Lucas,

                  thanks for your help smiley the first solution does appear to work correctly when i take out the additional &sortBy=`id` i suppose that's what happens when working when tired.

                  thanks again.

                  all the best

                  stuart