We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9674
    • 170 Posts
    Am I wrong or it it a bug ?

    I have a page calling wayfinder in the content as :

    [[Wayfinder? &rowTpl=`marqueTpl` &rowIdPrefix=`zz`]]


    My marqueTpl is :

    <li><a href="[[+wf.link]]" class=" wf.classnames" title="[[+wf.title]]">identifier :[[+wf.id]]  </a> </li>


    and I get this as a result :

    <ul>
    <li><a href="produits/mini-pelles-sur-chenilles/takeuchi-mini-pelles-sur-chenilles/mini-pelle-sur-chenille-takeuchi-tb108.html" class=" wf.classnames" title="TB108">identifier : id="zz33"  </a> </li>
    <li><a href="produits/mini-pelles-sur-chenilles/takeuchi-mini-pelles-sur-chenilles/mini-pelle-sur-chenille-takeuchi-tb106.html" class=" wf.classnames" title="TB106">identifier : id="zz34"  </a> </li>
    </ul>


    which fdispays as :

    identifier : id="zz33"
    identifier : id="zz34"


    Where i would expect :

    identifier :zz33
    identifier :zz34



    Is anyone using this wf.id and rowIdPrefix in the same manner and getting this wrong as me ?

    I am running modx 2.2.6-pl (advanced) and wayfinder 2.3.3

    Thanks for help and if it is a bug, what is the workaround ?

    Philippe

    This question has been answered by sottwell. See the first response.

    [ed. note: Fildefer57 last edited this post 13 years, 6 months ago.]
    • discuss.answer
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      It is behaving as expected - the reference is to an HTML ID attribute:
      &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"
      What you need is to use [+wf.docid+] in your tpl.
      <li><a href="[[+wf.link]]" class=" wf.classnames" title="[[+wf.title]]">identifier :zz[[+wf.docid]]  </a> </li>
        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
        • 9674
        • 170 Posts
        Thanks Susan, it did the trick.