We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7164
    • 4 Posts
    I’m trying to build a menu system using the Wayfinder that also uses breadcrumbs.
    I am new to Modx

    I have attached a link to explain this concept in greater detail.




    http://www.benjaminmumford.co.uk/dropbox/WayfinderMenu.pdf

    Any assistance you have would be much appreciated...
      • 14050
      • 788 Posts
      Organization of your documents in the document tree will be key in accomplishing what you are trying to do. Using your diagram terminology (adding numbers where necessary for the explanation), you would create two documents called "product_1" and "product_2." You would then create three documents called "Chapter1," "Chapter2," and "Chapter3." When creating those documents, you will click the folder icon next to where it says "Document parent:." This will cause the folder icon to change to an open folder. Then you will click on "product_1" to set "product_1" as the parent of Chapters one through three. You will repeat this process for Chapters four through six, but the parent would be "product_2." Then you will create three documents called "Topic1," "Topic2," and "Topic3." Each of these topics will have there parent set to "Chapter1." You will repeat this process for the remaining topics, setting their appropriate parents.

      Then you will need to place a call to the Breadcrumbs snippet where you would like the output. For instance, I place this call in my template. To have the output you desire, your breadcrumbs call would look something like this:

      [!Breadcrumbs? &crumbSeparator=`|`!]

      So essentially, you would use Wayfinder at Stage 1, as that is more of a menu structure, and then for the templates at stage 2, stage 3, and stage 4, you would instead use the breadcrumb snippet above.
        Jesse R.
        Consider trying something new and extraordinary.
        Illinois Wine

        Have you considered donating to MODx lately?
        Donate now. Every contribution helps.
        • 7164
        • 4 Posts
        Would this method accommodate (don’t think this was clear enough) only showing the next stages links (folders one level down) and the trail of your path current stage being active styled.
          • 24381
          • 9 Posts
          on a related subject, is it possible to use an image for the breadcrumb separator?

          cool
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That would require a bit of hacking (or run the Breadcrumbs snippet in a wrapper snippet) since the <img> tags you could otherwise use in the &crumbSeparator parameter needs an = (a no-no in snippet parameters).

            Or, you could just use a space or empty string (&crumbSeparator=``), and use a background image for the individual <a> tags in CSS.
              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
              • 24381
              • 9 Posts
              thanks for your speedy reply. It works fine as is. If I make any progress on it I’ll post back. cool
                • 24381
                • 9 Posts
                got the image for the breadcrumb separator thing figured out.

                • added my image (9x9px arrow) to assets/images
                • created a new plugin called BreadcrumbImage and added the following code:
                $old = '»';
                $new = '<img src="assets/images/arrow.gif"  />';
                $output = $modx->documentOutput;
                $modx->documentOutput = str_replace($old, $new, $output);

                • painfully learned not to add opening and closing php tags in plugin code..
                • set System Events to listen for OnWebPagePrerender
                works like a charm.....
                cool
                  • 24381
                  • 9 Posts
                  Would this method accommodate (don’t think this was clear enough) only showing the next stages links (folders one level down) and the trail of your path current stage being active styled.

                  Breadcrumbs is only designed to show 1 link per level so it probably would not work very well for what you want to do. However by setting up your doc & folders as Jesse R. described, the default MODx menu should create everything for you.

                  cool