We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2297
    • 31 Posts
    Just wondering if there’s a way to make Wayfinder dynamically insert the value for &startId from the current document’s ID?

    I’ve tried using &startId=`[*id*]` but that seems to break WF completely, as nothing is output at all:

    [[Wayfinder? &startId=`[*id*]` &outerTpl=`menuContainer` &outerClass=`navigation` &rowTpl=`menuRows` &innerTpl=`innerContainer` &innerClass=`subnav` &innerRowTpl=`submenuRows` &level=`2` &parentRowTpl=`menuParents` &parentClass=`navparents` &rowClass=`navrows`]]

    The reason I’m trying to do this is that I’d like to put that WF call in a chunk, so that I can just call the chunk from any resource in the site, and that have resource’s children output in a list of links. Otherwise I need to paste the above WF call into each resource, changing the &startID parameter to match that document’s ID.

    I’ve tried using UltimateParent, but I don’t want the parent of the document be the startID; I want the document itself to be the startID. (Hope that makes sense.)

    I’ve also thought about using TVs, but my understanding from Kongondo’s wonderful ebook (from which I obviously nicked the above WF call) is that TVs go in templates, not the WF snippet call itself - or am I missing something? (Not sure I’d know how to implement a TV for that anyway. No, I take it back - I’m positive I wouldn’t know how to implement one!) grin
      • 26931
      • 2,314 Posts
      anonymized-26931 Reply #2, 17 years ago
      Hi AspenDew,

      did you try &startId=`[+id+]`

      *edit: seems not to work sad
        • 2297
        • 31 Posts
        Quote from: sharkbait at Sep 19, 2009, 08:30 AM

        did you try &startId=`[+id+]`

        Hey there sharkbait, many thanks for the speedy response!

        I hadn’t tried that, no, but I did so after reading your post. No luck, I’m afraid. I tried the call both cached & uncached, thinking that might be it, but it still doesn’t generate anything.

        It’s weird; I’d have thought it would have worked. I’ve double-checked the spelling of the chunk name. I’ve tried it by pasting the call directly into a resource instead of using it as a chunk, but it isn’t generating a menu either way. Methinks I’m not understanding something basic here.



          • 26931
          • 2,314 Posts
          anonymized-26931 Reply #4, 17 years ago
          actually it should work with [*id*], i just checked with a simple WF-call in a chunk:
          [!Wayfinder? &startId=`[*id*]`!]
          and it works
            • 26931
            • 2,314 Posts
            anonymized-26931 Reply #5, 17 years ago
            call wayfinder uncached (on a cached page), i just tried your WF-call in a chunk...it worked
              • 2297
              • 31 Posts

              Y’know, I could have sworn I did try it uncached, but I guess I didn’t.

              Because it works!

              THANK YOU, sharkbait!!! You are a genius and have saved me from having to update at least 30 or 40 pages!

                • 26931
                • 2,314 Posts
                anonymized-26931 Reply #7, 17 years ago
                good it worked! laugh
                You are a genius
                faaaaaaar from that - most of the time: try and error