We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13993
    • 100 Posts
    Anyone else having problems sorting their menus?

    I have my menu index #’s in the positions I want them, but they are out of order on my page.

    On my page the menu index is ordered in this order 0 3 2 4 1

    This is on the site in my sig.
      • 15987
      • 786 Posts
      I believe your problem is related to using mysql 4.1.12
      http://bugs.mysql.com/bug.php?id=21456

      I recently ran into the same problem and found a solution here:
      http://modxcms.com/forums/index.php/topic,6668.msg46904.html#msg46904

      Here is how to fix it in wayfinder ( I will put out an updated version this weekend )

      chenge the code on line 57-60 in wayfinder.inc.php from this:

      $sql = 'SELECT DISTINCT '.$fields.' FROM '.$tblsc.' sc LEFT JOIN '.$tbldg.
                  ' dg on dg.document = sc.id WHERE sc.parent = '.$id.
                  ' AND sc.published=1 AND sc.deleted=0 AND ('.$access.')'.$menuWhere.
                  ' ORDER BY '.$sort.' '.$dir.';';
      


      to this

      $sql = 'SELECT DISTINCT '.$fields.' FROM '.$tblsc.' sc LEFT JOIN '.$tbldg.
                  ' dg on dg.document = sc.id WHERE sc.parent = '.$id.
                  ' AND sc.published=1 AND sc.deleted=0 AND ('.$access.')'.$menuWhere.
                  ' GROUP BY sc.id'.
                  ' ORDER BY '.$sort.' '.$dir.';';
      


      I think that should fix it ( I have not tested this exatly though, so let me know if it works ok).
        • 13993
        • 100 Posts
        kylej

        Worked perfect. Thanks.
          • 1876
          • 835 Posts
          Hi

          Is it possible to order the menu by longtitle and no by ID ?

          thank’s
            • 29076
            • 615 Posts
            I’m having a hard time trying to figure out how WayFinder really works. And so far with no success. Is there by any chance a detailed documentation on this. Or maybe someone can wright down a detailed example, with every aspects. Just to get me in the right direction. Please.

            I have read the WayFinder-documentation but it doesn’t really tell much. I know CSS, XHTML and some PHP, but this was a nut. At least till I can get the right map.

            Thanks. smiley
              I think, thererfor I am! But what I am, and why...?
              • 12652
              • 228 Posts
              Okay, I haven’t even gotten into the templating of Wayfinder... and actually, this is a very basic horizontal menu so I’m hoping it shouldn’t even be necessary, if I understand Wf correctly.

              But I’m already at a loss as in simply switching over from the DropMenu I had, it has reordered the items and I 1) have no idea why, and 2) see no way to affect the order w/i Wf.

              This what I have:

              Showing as: Home Products About Members FAQ Store

              Should be: Home(1,0) Products(3,2) Store(52,3) FAQ(36,4) About(30,5) Members(31,6)
              (Doc IDs, Menu Index)

              It appears to be ordering based on Doc IDs with no regard to the Menu Index, so I have to assume there is some way to order by the menu index since that is what it is for and planning your layout sequentially based on creation would be a disaster.

              So needless to say, I’m a bit confused... help me see the light please.
                | Identity Developments delivers SEO focused web design and web presence services
                - it's not about websites, it's about your identity. |
                • 13736
                • 345 Posts
                I find it amazing that this thread has almost 200 replies to it now. And although I haven’t had a chance to dig into the workings of Wayfinder since DropMenu worked fine for my site, do you think maybe Wayfinder has some usabilities issues?

                Perhaps it’s time to get it’s own sub forum like Ditto, DropMenu, and MaxiGallery.
                  • 25663 MODX Staff
                  • 12,272 Posts
                  Since Wayfinder was orignally put in the forum as a beta, there clearly were usability issues. It’s INFINITELY easier to make custom CSS menus with Wayfinder... and it addresses the gross majority of requests people had with DropMenu. smiley

                  Yes it does deserve it’s on topical forum, along with eForm, Ditto and Jot. smiley
                    Ryan Thrash, MODX Co-Founder
                    Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    I believe that you’ll find the majority of the posts are CSS styling and positioning questions. They really don’t have anything to do with MODx and Wayfinder itself. Wayfinder just makes lists (although it will generate just about any kind of list you can imagine); it’s up to the designer to decide on the layout and how to style it.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 12652
                      • 228 Posts
                      As mentioned a couple posts up though, does anyone have any idea why my menu items are being placed in the order they are, or more importantly, how to designate the ordering?

                      Unless I missed it in the doc, I just didn’t see anyway to control that.

                      thanks
                        | Identity Developments delivers SEO focused web design and web presence services
                        - it's not about websites, it's about your identity. |

                      This discussion is closed to further replies. Keep calm and carry on.