We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15987
    • 786 Posts
    Over the last couple of days I have been working on some changes to the Wayfinder snippet and would love for some other people to get some eyes on it. Here is a list of things that have changed and what I am still working on.

    I decided to up the version to 2.0 since there are so many major changes.

    New Features:

    • template variable support; just add a placeholder into your template and it will get processed i.e. for the tv: docTags you would add a placeholder [+docTags+]
    • link for site start no longer includes the alias; i.e. www.modxcms.com instead of ww.modxcms.com/home.html
    • Ability to use a configuration file to set all of the wayfinder parameters. more documentation on this to come.
    • Ability to specify templates like ditto using the @FILE & @CODE options
    • parent templates only used if child documents are shown in the menu
    • Enhanced debugging (still needs some work smiley )


    • Rewrote how documents are retrieved to only use one db query for enhanced performance.
    • New parameter &displayStart - displays the document specified as the startId as a header to the menu (only works with startId not equal to 0)
    • New template &startItemTpl - Used to format the output of the startId Doc if &displayStart is used. Defaults to <h2>[+linktext+]</h2>
    • New parameter &includeDocs - comma delimited list of documents to be included in output. The startId is still required this just acts as a filter.
    • New paramter &excludeDocs - comma delimited list of documents to be excluded from the output. The startId is still required this just acts as a filter.
    • Rewrote some other stuff to make it work better and hopefully a little faster.

    To Do:

    • Maybe PHx support??
    • Suggestions???

    So give it a whirl and hopefully we can get this tested and ready in time for 0.9.6
      • 6726
      • 7,075 Posts
      My, my I am out of it for a bit over three weeks and all this great new stuff is out !
      This is awesome news, Wayfinder is so key to building MODx website I’ll put this one on top of my catchup list and report...

      I swear I’ll find a way not to drop for this long a time ever again, quite hard to catch up the freight train undecided
      I’ll brainstorm a bit to see if I come up with suggestions, but I like the new parameters already smiley
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l&#39;outil id
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Kyle, you got it. I will test on my personal site and let you know!

        I use Wayfinder for top nav, and 1 level deep sub nav, two separate calls. Should go seamless, I’d expect smiley

        I have a more advanced site that I’ll test on given further "public acceptance" wink
          Mike Reid - www.pixelchutes.com
          MODx Ambassador / Contributor
          [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
          ________________________________
          Where every pixel matters.
          • 25663 MODX Staff
          • 12,272 Posts
          How about including TVs in the templates? This could do double duty with link attributes via @EVAL for building custom javascript driven menus.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 25663 MODX Staff
            • 12,272 Posts
            There’s also the idea of the configuration system that Mark did for Ditto 2 that is handy. Basically you create variables for the bulk of the parameter configurations much like you did with the templates.inc.php file, only it allows you to set all parameter values. It’s very handy and would make a very convenient way to pass around menu examples with a single file and a folder full of images and maybe a .js or .css file here and there as appropriate (including regClient CSS and so on, that is).

            Talk about a convenient way to build up a developer toolkit ... wink
              Ryan Thrash, MODX Co-Founder
              Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
              • 14050
              • 788 Posts
              I haven’t had a chance to test this yet, but will this update address the issue here:

              http://modxcms.com/forums/index.php/topic,9174.msg63857.html#msg63857
                Jesse R.
                Consider trying something new and extraordinary.
                Illinois Wine

                Have you considered donating to MODx lately?
                Donate now. Every contribution helps.
                • 15987
                • 786 Posts
                @Ryan,
                I will look into both ideas... The configuration one shouldn’t be to hard, the tv one may be a little more involved, but I will definatly try and get that one working (I may have to review how ditto does it to see if I can just port it over)

                @jesster,
                Sorry, I completly forgot about that. I don’t think I have that fixed, but I will definatly get that put in. If you could give it a try and report back if it is fixed or not that would be great. I should be able to get to it later this evening or tommorow.


                Thanks for the ideas.

                Kyle
                  • 14050
                  • 788 Posts
                  Kyle,

                  I just tested it really quick. It still uses the parentRowTpl for a container with all children marked to not show in the menu.
                    Jesse R.
                    Consider trying something new and extraordinary.
                    Illinois Wine

                    Have you considered donating to MODx lately?
                    Donate now. Every contribution helps.
                    • 18397
                    • 3,250 Posts
                    Here is the dream I have for Reflect (Ditto’s archiving component) that Wayfinder would benefit from as well. The user creates a single template chunk that has nested templates in it and then the snippet takes that, breaks it apart into the segments it needs, and stores them in a cache file. That way a user could see his/her menu template easily and even make changes to the tag structure in an WYSIWYG editor...

                    The hard part is making it work...
                      • 15987
                      • 786 Posts
                      OK, I have updated the first post. Due to the large number of changes the version has been upped to 2.0