We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22933
    • 8 Posts
    I have a two level tree structure consisting of a load of folders with pages within. One folder has a third level of pages but I don’t want to show these in the menu. I’ve used the following snippet call to display the menu:

    [!Wayfinder? &startId=’0’ &level=’1’ &hideSubMenus=’1’ &parentRowTpl=’wfMenuImage’ &rowTpl=’wfMenuItem’ &outerTpl=’wfContainer’!]

    The menu displays exactly how I’d imagined it would. But I have created some chunks to replace the top folder item text name with an image as follows:

    <li[+wf.classes+]>
    <a href="[+wf.link+]" title="[+wf.title+]"><img src="/assets/images/mnu-[+wf.id+].png"/></a>
    [+wf.wrapper+]
    </li>

    But for some reason none of the chunk code is being used! I’ve checked and double checked the names, they are spot on and I’ve rather stumped now. Any suggestions to what the solution could be?
      • 11975
      • 2,542 Posts
      Hi,

      you are using simple quotes for the snippet params.
      Replace them with backticks ``

      [!Wayfinder? &startId=`0` &level=`1` &hideSubMenus=`1` &parentRowTpl=`wfMenuImage` &rowTpl=`wfMenuItem` &outerTpl=`wfContainer`!]

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 22933
        • 8 Posts
        Oh dear. Keep this one quiet eh! Thanks for the quick reply.
          • 25663 MODX Staff
          • 12,272 Posts
          It’s a very very common problem... no worries. smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 22933
            • 8 Posts
            Actually one more quick question. Is there any way to access the documents alias using wayfinder? Would prefer using that to id for image naming conventions.
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: PDG at Jan 05, 2007, 08:58 AM

              Actually one more quick question. Is there any way to access the documents alias using wayfinder? Would prefer using that to id for image naming conventions.
              Is this what you are looking for --> AliasLinks plugin...
                • 25663 MODX Staff
                • 12,272 Posts
                Please give an example of what you mean by "using that to id for image naming conventions", and also note the new addition on the "link line" in my signature. tongue
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 22933
                  • 8 Posts
                  Example: I’d rather use mnu-about.png than mnu-2.png (2 being the docid).

                  However I think the Alias plugin should do the trick. Cheers for your help!
                    • 14417
                    • 12 Posts
                    I’m having the same problem. I’ve verified which ticks I’m using and I have the correct ones. I changed the innerTpl chunck to not use the [+wf.link+] and coded it for the same id as a test. All four links still render with the correct URLs instead of the hardcoded id. This is how I know that it is ignoring the custom innerTpl chunk.

                    InnerTpl:
                    <li[+wf.id+][+wf.classes+]>
                    <a href="javascript:loadintoIframe(’myframe’, ’[~109~]’)" [+wf.classes+] title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>
                    [+wf.wrapper+]
                    </li>

                    Snippet Call:
                    [!Wayfinder? &startId=`[*id*]` &level=`1` &outerTpl=`Tabsouter` &innerTpl=`TabsInner5` !]