We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5532
    • 251 Posts
    HI There,

    We’ve gotten ourselves very confused over this so sorry if it’s simple.

    Here is the code we need wayfinder to output
    <ol>
    <li><a class="active"><span>Overview</span></a></li>
    <li><a href="#"><span>About</span></a></li>
    <li><a href="#"><span>Contact Us</span></a></li>
    </ol>
    

    Here is our wayfinder call:
    [!Wayfinder? &startId=`[[UltimateParent]]` &outerTpl=`SideNavigation` &rowTpl=`SideNavigationLI` &hereTpl=`SideNavigationA` &level=`1`!]
    

    Here is our &outerTpl=`SideNavigation`
    <ol>[+wf.wrapper+]</ol>
    

    Here is our &rowTpl=`SideNavigationLI`
    <li><a href="[+wf.link+]"><span>[+wf.linktext+]</span></a></li>
    

    And here is our &hereTpl=`SideNavigationA`
    <li><a[+wf.classes+]><span>[+wf.linktext+]</span></a></li>
    

    And here’s what gets output from wayfinder
    <ol>
    <li><a class="active"><span>Overview</span></a></li>
    <li><a><span>About</span></a></li>
    <li class="last"><a><span>Contact Us</span></a></li>
    </ol>
    

    As you can see no links get output! Obviously we’ve missed something simple, any help would be much appreciated.

    Cheers

      • 16183
      • 1,390 Posts
      Hmm, it’s late, my eyes are tired, etc...but it seems like the problem lies in your &rowTpl.

      The above output is when the document "Overview" is currently selected, correct? That means that for "About" and "Contact Us", the rowTpl is being used. Now, in the code for your &rowTpl above, there is no class/class names placeholder or any other custom classes, so, in the output code, where is the class="last" coming from?

      I have a feeling that maybe it is a mispelling in the rowTpl chunk you are telling WF to use, so it is probably using the "wrong" chunk?...just a guess...

      /k

        • 5532
        • 251 Posts
        Thank you, have had a quick look and can’t see anything but I see your point.

        Will be working on this today so will give it a good going over.

        Cheers
          • 5532
          • 251 Posts
          Turns out the <li> template didn’t have a [+wf.wrapper+] which meant nothing was being output.

          The template should’ve had the following code:
          <li [+wf.wrapper+]><a href="[+wf.link+]" title="[+wf.title+]"><span>[+wf.linktext+]</span></a></li>
          

          Kongondo, thanks for replying and thanks for creating the almost complete guide - very helpful.

          Cheers
            • 16183
            • 1,390 Posts
            Glad you sorted it out but looking at your amended code you seem to have placed the wrapper in a stranger location; within the first <li> tag, why?

            /k