We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28189
    • 47 Posts
    Quote from: ottogal

    So what is your problem? No output at all? What is the output, if any?

    Wasn’t it clear in my initial post?

    "The outerTpl template is being applied to all <ul> tags in the nav."

    Quote from: einsteinsboi

    i’ve run into this issue before, you may need to create an innertpl chunk too

    YES! You are 2 legit. Thank you!
      • 42141
      • 73 Posts
      My main navigation is hardcoded in my template, but can I use Wayfinder to make menu like this?

      My website has 6 mainpages:

      Page 1
      Page 2
      Page 3
      Page 4
      Page 5
      Page 6

      Page two leads to section with subpages:

      Page 2
      Page 2.1
      Page 2.2
      etc.

      Page 2.1 also has subpages:

      Page 2.1.1
      etc.

      What I want Wayfinder to do, is to show on page 2.1 all the subpages that belongs to 2.1 (and on 3.1 all the ones for 3.1, etc.). How do I achieve that? It's not clear to me from the options...
      • Wayfinder should do that automatically. The default settings should go through all levels of your structure and print it out on the page. There is nothing you should need to setup. Just try this:
        [[Wayfinder? &startId=`0`]]
        It should go through your whole site structure and print out using its default template chunks the whole website like a sitemap.
          Benjamin Davis: American web designer living in Munich, Germany and a MODX Ambassador. I am also co-founder of SEDA.digital, a MODX Agency.
          • 42141
          • 73 Posts
          But I don't need Wayfinder to list all the pages. Only the childpages of the page visitors are on smiley
            • 22427
            • 793 Posts
            There is the parameter &startId for the ID of the resource of which Wayfinder will include the children in its output. For example:
            [[Wayfinder? &startId=`42`]]
            will show the child resources (may be their children too, depending on other parameters) of the resource 42.

            If you use the resource field [[*id]] (which gives the ID of the actual page), you just put this Wayfinder call in your page template:
            [[Wayfinder? &startId=`[[*id]]`]]
            and you get your desired result.

            For more details have a look at the Wayfinder Demo.
              • 42141
              • 73 Posts
              Hm, I think I am just going to create more templates. I can't make it work like I want it sad

              • I usually use a TV for this, with the TV's default value @INHERIT. Then for the top-level layer of items, I'll edit the TV to be that resource's ID. This way all of its children will inherit the same value for the startId.

                [[Wayfinder? &startId=`[[*sidemenuStart]]`]]
                  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