We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13629
    • 23 Posts
    I’m creating something similar to a DHTML menu and I need to attach some extra content to each one of my nav items.

    I’m sure there’s an easy way to do this but I can’t figure it out. Ideally, I would have a template variable on each document that would control the content that’s attached to each nav item.

    What’s the best way to achieve this? The more you can spell it out for me, the better. I’m new to Wayfinder.

    Thanks!
    Jason
      • 4310
      • 2,310 Posts
      Why not use one of the existing TV’s e.g.
      [*pagetitle*] [*longtitle*] [*description*] [*introtext*] [*link_attributes*] [*menutitle*]

      Unless you’re using them all grin
        • 13629
        • 23 Posts
        I’d like to use an existing TV only as a last resort. The text I’m attaching is not a page title, long title, description, intro text, link attribute or menu title.

        That aside, does Wayfinder provide a placeholder for all of these TVs? I tried doing [+wf.pagetitle+] as a test and nothing came up.

        Thanks,
        Jason
          • 4310
          • 2,310 Posts
          I see what you mean.
          These TV’s have direct placeholders :
          [+wf.attributes+] - where to insert link attributes
          [+wf.docid+] - the document identifier for the current item
          [+wf.description+] - output the description field
          [+wf.introtext+] - output the introtext field

          While these are parameters,  you can specify which TV is used in your snippet call  :
           &titleOfLinks = '[+wf.title+]
          &textOfLinks = [+wf.linktext+]


          EDIT as per kongondo’s post !
            • 16183
            • 1,390 Posts
            Quote from: bunk58 at Oct 20, 2008, 03:00 AM

            While these are parameters, you can specify which TV is used in your snippet call :
             $titleOfLinks = '[+wf.title+]
            $textOfLinks = [+wf.linktext+]

            @David, shouldn’t those $ be & ?

            @Jason - if you haven’t already done so, grab a copy of the zip file at the top of this page http://wiki.modxcms.com/index.php/Wayfinder200

            It explains what David has mentioned in his post plus much more...

            cheers/k

              • 13629
              • 23 Posts
              Thanks, guys. That zip file is pretty helpful.