We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32124
    • 10 Posts
    I’m trying to output a simple 1 level list with Wayfinder and something seems to be breaking down when I try to use a rowTpl.

    Using:
    MODx Revolution 2.0.0-rc-1 rev6614
    wayfinder 2.1.1 rc

    I’ve searched the forums/wiki/muddydogpaws docs and every example I’ve tried won’t show the rowTpl.
    //This does work:
    [[!Wayfinder? &startId=`0` &level=`1` &hereClass=`selected` ]]


    The above snippet will output the list, however I need to add more info so my css can render it properly.

    The following code will only output the outerTpl and nothing else, when I ran it using debug it appeared to run through each resource without error, only no list-items get printed.
    // template 
    [[!Wayfinder? &startId=`0` &level=`1` &hereClass=`selected` &outerTpl=`menu.OuterTpl` &rowTpl=`menu.InnerTpl` ]]
    
    //menu.OuterTpl chunk
    <ul id="menu">
        [[+wf.wrapper+]]
    </ul>
    
    //menu.InnerTpl chunk
    <li[[+wf.id+]] [[+wf.classes+]]>
      <a href="[[+wf.link+]]" title="[[+wf.title+]]">[[+wf.linktext+]]</a>
    </li>
    
    // HTML output
    <ul id="menu"> 
        
    </ul>
    


    I realize both of these are only RC versions so I expect some bugs, but I’ve been fiddling with this one for a while and can’t seem to figure it out. Thought I’d let another pair of eyes see if I’ve missed something.

    In the meantime I’ll keep digging.

    Thanks
    *.* Sherri
      • 32674
      • 101 Posts
      I remember shamblett mentioning a revo problem with smarty templates in 3PCs in provisioner. Could be the same bug with wayfinder?

      http://modxcms.com/forums/index.php/topic,48746.0.html
        • 32124
        • 10 Posts
        Thanks I’ll see if it’s related somehow.
          • 12236
          • 48 Posts
          Digital Butter - MODX Premiere Partners Reply #4, 16 years, 5 months ago
          Haven’t used WayFinder for revo so not sure if it has it’s own templating syntax, but if it doesn’t, then the tag syntax for Revo is a bit different than what you have listed below:

          <ul id="menu">
              [[+wf.wrapper+]]
          </ul>


          Using the revo tag syntax would actually be:

          <ul id="menu">
              [[+wf.wrapper]]
          </ul>


          Note there’s only one ’+’ (plus) symbol.
            • 32124
            • 10 Posts
            Super! That did it. Thanks so much, its been a few years since my last modx project, looks like I have some more doc reading to do.