We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26507
    • 7 Posts
    Hey everybody,

    This is my first time using modx as a CMS, and so far it’s been really great – just one question that’s been really stumping me. My client has a very intricate sitemap that equates to having the same page appear in quite a few navigation submenus. Since Wayfinder uses parents to automatically generate the menu, is there any possible way to give a page more than one parent without straight up duplicating it (that would be a pain to update the same page in 5 different places every time).

    Thanks a ton!
      • 18389
      • 169 Posts
      You can do that with Ditto if you want the content of another page to appear.
      If you want a second menu you can use a second wayfinder call and use parameters to control where in the resource tree you are pulling from.
        www.markojokic.com
        • 26507
        • 7 Posts
        hmm alright ditto seems like that would do the trick. would that require a new template for a ditto-ed page, with ditto parameters instead of TVs? sorry i’m a pretty large modx noob, but what do you think would be the best way of implementing this? thanks!
          • 18389
          • 169 Posts
          You do not have to use TV’s.

          Each pages that are getting "ditto’d" can have their own template.
          The page that has the ditto call on it, where the pages are aggregated to has it’s own template

          Take a look at my news archive page: http://www.markojokic.com/index.php?id=47

          All of my individual pages are stored in an unpublished container page with the id of 12, and they use the same template as each other.
          In the ditto call on the link above I used the parameter &parents=`12`. It has it’s own template that has the ditto call in it.
          so everything in that container gets listed .

          I am just giving you that simple part of it. There are a lot more parameters and css I used to build it of course.

          You have to start messing with the parameters to learn it well. It took me a bit to wrap my head around it but it wasn’t too bad once a thing or two "clicked" up there.
            www.markojokic.com
            • 18389
            • 169 Posts
            oh yeah, also, the individual news pages do not have a ditto call. you only use ditto on the page that is "pulling" other resources.
              www.markojokic.com
              • 22840
              • 1,572 Posts
              It’s never a good idea to duplicate the same content onto different pages as it could affect results in search engines, you would be far better creating web links instead of multiple pages and have them all point to the one page.
                • 18389
                • 169 Posts
                Could that be a way to get what seanf needs done? Could you explain how?
                  www.markojokic.com
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  A weblink is a special kind of resource that only has a URL (or another resource’s ID) as its content.
                    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
                    • 22840
                    • 1,572 Posts
                    As Susan has already said, instead of having content it just links to another url ( in this case it would be on the same site but can be used to point to a off site url ) however wayfinder still adds it to the navigation.
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                        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