We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25560
    • 16 Posts
    hi

    is it possible to pass the current documents ID into WF, so that it dynamically shows a "containers" documents?

    attempting to create like a dynamic navigation

    currently EVERY document is shown - i can set the doc id to be a container id and do it manually, but it would be convinient if i could just pass WF the current odcuments ID.

    thanks
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Use the &displayStart and the &startItemTpl for this; the default startItemTpl uses h2 tags.
        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
        • 26387
        • 13 Posts
        Could could you elaborate a little please, i am new to the cms and trying to achieve something similar. Perhaps an example of what the way finder code should look like.


        thanks
          Need a site designed or a psd converted to xhtml?
          http://www.redrum-designs.com
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          The startId could not be 0 here, as in that case there is no resource to get the linktext from!
          [[Wayfinder? &startId=`42` &displayStart=`1` &startItemTpl=`startItemTpl`]]


          The startItemTpl chunk could look like this:
          <h2>[+wf.linktext+]</h2>[+wf.wrapper+]


          Don’t forget the [+wf.wrapper+] placeholder; it tells Wayfinder to continue generating the rest of the menu.
            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