We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    I found a wayfinder chunk for rowTpl and [[+wf.id]] was included. Should it even be in there? Why would one ever include this placeholder after the li tag?. Bob's book says this placeholder is for inserting a unique id specified in the &id property. I don't have a &id property in my wayfinder tag. I do have a &startId, but not one that references a "unique" id.

    <!-- rowTpl -->
    <li[[+wf.id]] class="[[+wf.classnames]]">
    <a href="[[+wf.link]]" title="[[+wf.title]]" [[+wf.attributes]]>[[+wf.linktext]]</a>
    [[+wf.wrapper]]
    </li>

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you specify &rowIdPrefix then that placeholder will insert a unique ID there:
      &rowIdPrefix default: FALSE
      values: name of prefix
      description: If this parameter is set, Wayfinder will replace the placeholder [+wf.id+] with a unique id consisting of the specified prefix plus the document id.
      example: &rowIdPrefix=`topMenu` will output the following for doc # 29: id="topMenu29"
        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
        • 40045
        • 534 Posts
        Uuuh, susan was faster =), there is also a [[+wf.docid]] placeholder and it returns the id of the corresponding resource!
          • 19872
          • 1,078 Posts
          Ah ha! Very helpful. But in my case at the moment, since I do not have a property set in my wayfinder tag, I probably don't need [[+wf.id]] in there at all.

          Thanks for the quick response.

          [ed. note: mmcgee last edited this post 13 years, 6 months ago.]