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

    Thanks in advance for helping, I am trying to understand if Wayfinder permits different sorting filters: for level 0 as menuindex and for the level 1, for example, by published date.
    If yes, what shall be the call?

    Thanks alot,
    Alexandru
      • 22427
      • 793 Posts
      This should work (but didn't try it myself):
      You use one WF call for level 0 only, containing
      --- &sortBy=`menuindex`
      --- &level=`1` (to prevent the output of the deeper levels)
      --- &rowTpl=`rowChunk`
      where the rowChunk contains a second WF call for the children of the level 0 item - with, of course, &sortBy=`publishedon`.
        • 36832
        • 22 Posts
        Thanks @ottogal, if for the main level the call is clear, using a rowChunk template that looks like this:
        <li class="category [+wf.classnames+]"><a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>
        raise the questions: Where shall I add the call for WF? Shall I call using something similar like
        [[Wayfinder?startId=`0` &outerClass=`sf-menu` &innerClass=`current` &hereClass=`here` &level=`0` &sortBy=`publishedon`]]
        



        Many thanks
          • 22427
          • 793 Posts
          The default Row Template (which is used if you don't give an explicit &rowTpl parameter) would be something like this:
          <li[+wf.id+][+wf.classes+]><a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>[+wf.wrapper+]</li>
          Here [+wf.wrapper+] assures the insertion of the submenu of the row.
          Just replace the [+wf.wrapper+] by the WF call.
          But it's &startId should be the ID of the actual document to get only its own children in the submenu:
          [[Wayfinder?startId=`[+id+]` &outerClass=`sf-menu` &innerClass=`current` &hereClass=`here` &level=`0` &sortBy=`publishedon`]]