We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9082
    • 1 Posts
    I been dealing alot with wayfinder chunks and Im not sure what goes wrong..
    <ul id="menu">
    	<li class="menu"><a href="basic.html">Home</a></li>
    	<li class="menu"><a href="basic.html">Biker Camp</a></li>
    	<li class="menu"><a href="basic.html">Club</a></li>
    	<li class="menu"><a href="basic.html">Events</a></li>
    	<li class="menu"><a href="basic.html">Contact</a></li>
    </ul>	
    


    This is the raw html, but I can’t seem to manage the how the chunks repeat..

    i’ve been using
    <li[+wf.classes+]>[+wf.wrapper+]</li>
    but the html output is just wrong.. it forgets the <li class> and only shows of once.

    google, wiki and blogs - been there, but I haven’t found a really good explanation for how to build the right chunk in this case.
      • 15451
      • 87 Posts
      hi there esben, not sure if i can help as i’m not-so-good at this but will do my best.

      i you had your wayfinder call as something like:
      [[Wayfinder? &startId=`0` &outerTpl=`outerTpl` &rowTpl=`rowTpl`]]

      and then your chunks...
      outerTpl: <ul id="menu">[+wf.wrapper+]</ul>
      rowTpl as: <li[+wf.classes+]><a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>

      would that help? laugh
        • 7231
        • 4,205 Posts
        This is not a complete tpl all you have is the wrapper which is used to go to the next level only and has no output itself.
        <li[+wf.classes+]>[+wf.wrapper+]</li>


        The idea would be something like kathleenread stated:
        <li[+wf.classes+]><a href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>


        If there will not be any deeper levels than you do not need to include the wrapper, only in the outer tpls as in:
        <ul id="menu">[+wf.wrapper+]</ul>
          [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

          Something is happening here, but you don&#39;t know what it is.
          Do you, Mr. Jones? - [bob dylan]
          • 22427
          • 793 Posts
          Hi Esben,
          why do you use <ul id=...> and not <ul class=...>? Wayfinder by its parameter [+wf.classes+] looks for a class.
          Of course you cannot take class="menu" both for the <ul> and for the <li> - so just choose f.i. <li class=item"> or something like that.
          Another observation: All the link targets in your list are identical (<a href="basic.html">). Do you really have the documents for Home, Biker, Club etc. in your documents tree? (If you did’nt just simplify your code for the post...)
          Be sure: Wayfinder is not difficult - it’s simple... Good luck!
          ottogal