We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18862
    • 70 Posts
    According to the documentation at muddydogpaws [[Wayfinder? &startID=`[*id*]`]] should work, right?

    For some reason the [*id*] does not resolve within the wayfinder call. I put it in the content beneath the wayfinder call and it comes back as the document ID as I would expect, but when using within the wayfinder I get no output. If I hard code in the document id then it works as expected.

    Anyone else get [*id*] or [*parent*] for that matter to work within wayfinder call?
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That’s &startId and not &startID.
        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
        • 3749
        • 24,544 Posts
        &startID is (or was) a Ditto parameter. I still get these confused. smiley

        Bob
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 25663 MODX Staff
          • 12,272 Posts
          Those should be unified IMO and put into a best practices page for add-on development in the wiki.
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 18862
            • 70 Posts
            Thanks for the responses. I mistyped the subject for this.
            I actually do have it correct. &startId=`[*id*]`
            Still, it doesn’t work. Like I said, when I hard code the number in it works. IE: &startId=`52`
            And I put [*id*] in the content for the page and it does display 52 on the page. Just doesn’t work when I plug that into the wayfinder call.

            Is it not supposed to work that way?
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Try the Wayfinder call uncached ... [!Wayfinder? ... !]
                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
                • 18862
                • 70 Posts
                Susan, what would this forum be without you?!?! smiley
                The number of your posts speaks volumes.

                Thanks for all you do to make using ModX possible for all of us less experienced people.

                Yes, that did it. If you have time.. do you have an explanation as to why that is necessary in this case?
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Not 100% sure, would need to check the code in document.parser.whatever.php, but I believe that snippets are parsed before template variables are, so the snippet is being parsed without the value of the TV; it’s trying to use the TV tags for the parameter value.

                  When a snippet is called [!...!], the parser doesn’t process the snippet; it replaces the [! and !] with the usual [[ and ]], finishes parsing the document, then runs the whole document through the parser again. But this time, the TV has been parsed (it was parsed eventually in the initial pass), so now you’ve got the TV value in place for the snippet’s parameter.
                    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
                    • 18862
                    • 70 Posts
                    Makes perfect sense. Thanks for the explanation! smiley