We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    I have completed most of the work on the new menu builder WayFinder. I have attached the snippet and would love for anyone who has time to give it a good run through. It now uses templates for output and they are required, so read through the doc at the top to get a feel for how it is used.

    The one feature that still needs added is the category folders, and I will be working on that soon. I am also thinking of adding a variable to set a css chunk to be included. Then with the chunk use a regclientcss to add it to the page so we could release full menu templates with the chunks and css all in one package.

    I also plan on doing some timing tests to see how it compares to the original dropmenu.

    So give it a whirl and let me know if there are any bugs or additional features I missed.

    Kyle

    Edit - I have updated the files with Jasons suggestions, you must create a folder under assets/snippets named wayfinder and put the file wayfinder.inc.php in there. I tested it with php4 + php5 and is working correctly now.

    Edit - 07/15/06 - Fixed error of not adding submenus if at end of menu.

    Edit - 07/16/06 - If no innerHereTpl chunk specified uses hereTpl if specified
      • 33337
      • 3,975 Posts
      Is this a successor of DropMenu ?
        Zaigham R - MODX Professional | Skype | Email | Twitter

        Digging the interwebs for #MODX gems and bringing it to you. modx.link
        • 10487 MODX Staff
        • 1,535 Posts
        To all who have been involved in the development in this - great work! smiley

        Just ran a quick test on PHP4 and this fails for the same reasons that the current Membercheck does. If the changes I made to Membercheck are okay, then they could be drafted in easy enough.

        Just off to test on my local PHP5 install ....

        @Zi - Yes, this is the successor to DropMenu (I think anyway tongue)

        @Kyle - If you want to use my live test site for PHP4 testing, you know the login wink
          Garry Nutting
          Senior Developer
          MODX, LLC

          Email: [email protected]
          Twitter: @garryn
          Web: modx.com
          • 22303 MODX Staff
          • 10,725 Posts
          There is no reason for a singleton to be used here. So first, get rid of the static $instance and the getInstance() function. Next, I suggest making this snippet include_once the class as an external file. This will increase performance with multiple uses per request, and will also allow it to take full-advantage of opcode caching systems when employed. The snippet should simply contain the instance of the class, the default settings and ability to override those with snippet parameters, then execute the main function to render the menu to screen or placeholder, or whatever...
            • 15987
            • 786 Posts
            Quote from: OpenGeek at Jul 14, 2006, 05:23 PM

            There is no reason for a singleton to be used here. So first, get rid of the static $instance and the getInstance() function. Next, I suggest making this snippet include_once the class as an external file. This will increase performance with multiple uses per request, and will also allow it to take full-advantage of opcode caching systems when employed. The snippet should simply contain the instance of the class, the default settings and ability to override those with snippet parameters, then execute the main function to render the menu to screen or placeholder, or whatever...

            Jason, thanks for the suggestions. I will rework it and get an updated version out tommorow. If you find anything else you think should be reworked in any way let me know.

            Quote from: garryn at Jul 14, 2006, 04:23 PM

            To all who have been involved in the development in this - great work! smiley

            Just ran a quick test on PHP4 and this fails for the same reasons that the current Membercheck does. If the changes I made to Membercheck are okay, then they could be drafted in easy enough.

            Just off to test on my local PHP5 install ....

            Thanks garry, I will get a new version out to fix this.


            Quote from: garryn at Jul 14, 2006, 04:23 PM

            @Zi - Yes, this is the successor to DropMenu (I think anyway tongue)

            He is right it is dropmenus successor.


            Quote from: garryn at Jul 14, 2006, 04:23 PM

            @Kyle - If you want to use my live test site for PHP4 testing, you know the login wink

            Thanks, that will be great!
              • 25663 MODX Staff
              • 12,272 Posts
              Lady and Gentlemen: (sottwell is the only female with access here currently...)

              We are very close to a test build for the next release. Long live DropMenu, DropMenu is dead!

              Kyle, Thanks for doing such a great job. smiley
                Ryan Thrash, MODX Co-Founder
                Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                • 15987
                • 786 Posts
                Quote from: rthrash at Jul 14, 2006, 06:43 PM

                Kyle, Thanks for doing such a great job. smiley

                Thanks Ryan smiley

                I have updated my first post with Jasons suggestions. It now should work correctly in php4+.
                  • 18397
                  • 3,250 Posts
                  Man you guys are fast! I’m busy for 2 days, come back and this is already finished!
                    • 1876
                    • 835 Posts
                    Hi

                    I have an error :

                    Parse error: parse error, unexpected T_STRING in /homepages/2/d150565207/htdocs/coindeparadis/manager/includes/document.parser.class.inc.php(705) : eval()'d code on line 1


                    The snippet is well install.
                    I call it : [[wayfinder? &startId=`0` &level=`2` &hideSubMenus=`1` &outerTpl=`wfOuter` &rowTpl=`wfRow` &hereTpl=`wfHere`]]

                    The 3 chunks are created like the example.

                    Thank’s
                      • 15987
                      • 786 Posts
                      aour,
                      try re-adding the snippet. there is a php tag in the comments on line one and am wondering if that got uncommented when you copied it in.