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

    I am wanting to run wayfinder with a template variable as the link text for a tab menu.

    With my current wayfinder call, the template variable text is inserted - but each page shares the same text in the tab menu.

    eg. Say the site structure is as follows:
    + home
    + about us
    + contact us
    + links

    the tab menu on the home page currently is :
    + home
    + home
    + home

    and the tab menu link on the about us page currently is:
    + about us
    + about us
    + about us

    How do I get it to display like so?
    + home
    + about us
    + contact us
    + links


    My Current Wayfinder call

    [[Wayfinder? &startId=`0` &level=`0` &outerTpl=`tabmenu-outerwrapper` &rowTpl=`tabmenu-row` &textOfLinks=`[*tabmenu-text*]` &includeDocs=`1,2,3,4,5,6,7,8`]]



    row template

    <li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[*tabmenu-text*]</a></li>



    outer wrapper

      <div class="holder">
       <ul>
    [+wf.wrapper+]
       </ul>
      </div>



    the template variable is called: [*tabmenu-text*]


    an example variable for a page is: about
    us

    Know where I am going wrong?

    Thanks in advance.
      Web design Adelaide
      http://gocreate.com.au
      • 3707
      • 241 Posts
      In your &rowTpl change [*tabmenu-text*] to [+tabmenu-text+]. [*tabmenu-text*] pulls in the value of the TV from the current page therefore, all the menu items have the same link text.
      <li[+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]">[+tabmenu-text+]</a></li>
        • 21417
        • 486 Posts
        Wow - thanks a million Bob1000!

        That works perfectly.

        Cheers
          Web design Adelaide
          http://gocreate.com.au