We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21870
    • 7 Posts
    Looking through the documentation and snippet code I know this is possible. Unfortunately I am not adept enough to fully understand the templating using Wayfinder. Is there a simple way that I’m missing (i.e. a parameter) that I can call to display the document description for a menu link? Basically I am trying to output an unordered list as a sidebar with descriptives for each sidebar link. I’m hoping to use the document description field (or some other document field) to populate these sidebar descriptives. Any help would be greatly appreciated, thanks.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      You can use [+wf.description+] in your template chunk anywhere you want to display it, and style it with your CSS. For example, your innerRow tpl would look like:
      <li [+wf.id+] [+wf.classes+] >
      <a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+] - [+wf.description+]</a>
      [+wf.wrapper+]
      </li>


      In the document available for download the question is posed:
      Have the following placeholders been eliminated in Wayfinder 2.0, because you can now reference these standard document fields without the "wf." prefix, or have they been retained for backwards compatibility???
      The answer is NO!. Because if you use [+description+] the text inserted will be the description of the page you are looking at, not the description of the page the link is for! If you want the attributes, description, etc of the page the link is for in each row, you need to use the [+wf.fieldname+] placeholder.
        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
        • 21870
        • 7 Posts
        Thanks for your help, worked like a charm and now I somewhat (read: minimally) understand the Wayfinder templating which will be great for future work. Unfortunately before I could follow your code I needed to figure out the basics of the proper syntax for using template chunks with Wayfinder. In case anybody else needs the same info I found another helpful post on the forums here:

        http://modxcms.com/forums/index.php/topic,6207.msg44410.html#msg44410

        Not sure if I just missed this in the documentation or what.