We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14434
    • 5 Posts
    Hey guys, i have used wayfinder in every project i made and this is the first time im a bit stuck on a new feature my client wants.

    I have this structure
    - web
    - link 1
    - link 2
    - link 21
    - link 3
    - link 31
    - link 32
    - link 4

    Now the default behavior makes link3 a clickable link and has its own page. In earlier projects i have used the plugin FirstChildRedirect, to redirect this item to "link 31". But now my client wants that this link is simply not clickable.
    So link 3 has no href attribute, but this is not for every folder, since link 2 must be a page.

    I have used this chunk of code for the menurow template, but it doesnt seem to work? My idea wa sthat if the client did not fill in the document alias, i would check that and then not create a link.

    <li [[+wf.id]] [[+wf.classes]] > <a [[+wf.link:is=`[[+wf.docid]]/`:then=``:else=`href="[[+wf.link]]"`]] [[+wf.attributes]]>[[+wf.linktext]]</a> [[+wf.wrapper]] </li>​


    Help plx wink
      • 36442
      • 97 Posts
      Reason of the problem may be that [[+wf.link]] contains not just page’s alias, but the whole URL, depending on your settings.
      Just check [[+wf.link]] raw output and make corrections to conditional statement.
        • 14434
        • 5 Posts
        The stupid thing is that [[+wf.link]] outputs 38/ for example
        and [[+wf.docid]]/ too
        so my condition should pass, but it doesnt..is there something wrong with my if/else condition ?
          • 36442
          • 97 Posts
          I noticed once, that is-then-else modifiers don’t work properly, but didn’t dig into that. Try using If snippet.
            • 14434
            • 5 Posts
            Thank you, for some reason the IF snippet executed the condition perfectly.
              • 18862
              • 70 Posts
              Sorry to resurrect this post, but would you mind sharing the final code you used for this Joepske83?
              I'd like to implement the same functionality.
              (by the way.. was this for Evolution or Revolution?) [ed. note: mbrinson last edited this post 13 years, 10 months ago.]