We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22427
    • 793 Posts
    I think it should say $output, not $input?
    No, $input refers to the value the modifier is acting on, in this case the value of [+wf.docid+].

    Using [+wf.docid:getLevel+] does give me 0, so I've changed it to
    [+phx:input=`[+wf.docid+]`:getLevel+] which seems to give me the right levels.
    Yes, obviously you need an explicit phx tag.

    I need to add <li>[+wf.wrapper+]</li>
    At the moment I don't see a reason for that. When I'll find the time I will have a nearer look into it.
      • 37758
      • 73 Posts
      Quote from: ottogal at Feb 19, 2013, 01:27 PM
      I think it should say $output, not $input?
      No, $input refers to the value the modifier is acting on, in this case the value of [+wf.docid+].

      Hmmmm, I had a look at the documentation about this and couldn't find the '$input' and if I put that in, I get nothing, print_r($output) (in the phx snippet) gives me the docID as expected, print_r($input) gives me &_PHX_INTERNAL_&?

      I need to add <li>[+wf.wrapper+]</li>
      At the moment I don't see a reason for that. When I'll find the time I will have a nearer look into it.

      Further trials have revealed that my PHx isn't actually working, it's the [+wf.wrapper+] outside that throws in the pages I need and it's still showing the level up I want to hide.

      I'm exhausted by this, feel like giving up sad
        • 37758
        • 73 Posts
        Quote from: ottogal at Feb 19, 2013, 01:27 PM
        I think it should say $output, not $input?
        No, $input refers to the value the modifier is acting on, in this case the value of [+wf.docid+].

        Hmmmm, I had a look at the documentation about this and couldn't find the '$input' and if I put that in, I get nothing, print_r($output) (in the phx snippet) gives me the docID as expected, print_r($input) gives me &_PHX_INTERNAL_&?

        I need to add <li>[+wf.wrapper+]</li>
        At the moment I don't see a reason for that. When I'll find the time I will have a nearer look into it.

        Further trials have revealed that my PHx isn't actually working, it's the [+wf.wrapper+] outside that throws in the pages I need and it's still showing the level up I want to hide.

        I'm exhausted by this, feel like giving up sad
          • 22427
          • 793 Posts
          I found this old thread:
          Ditto doesn't parse placeholders from templates inside of phx call
          and can imagine that our problem is related to it.

          So I propose to try this &InnerRowTpl:
          [+wf.docid+][+phx:input=`[+wf.docid+]`:getLevel:is=`2`:then=``:else=`<li><a title="[+wf.title+]" href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>`+]
          that is, add the placeholder [+wf.docid+] outside of the [+phx] tag.
          To prevent this placeholder to be output, set its limit to 0:
          [+wf.docid:limit=`0`+][+phx:input=`[+wf.docid+]`:getLevel:is=`2`:then=``:else=`<li><a title="[+wf.title+]" href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>`+]

          That might help (I couldn't test it).
            • 37758
            • 73 Posts
            thanks very much ottogal. I now seem to have success in terms of it writing out without the extra parameter. Unfortunately, though, not the desired result overall
            - I still don't get any joy with "$input", I need "$output" to give me the levels.
            - Once I have the levels, processing stops for the levels beyond 2. I think this is probably the way Wayfinder works, i.e. it's the [+wf.wrapper+] that gives me the lower levels, so I've change it to this now (notice the [+wf.wrapper+] in the is=2 condition

            [+wf.docid:limit=`0`+][+phx:input=`[+wf.docid+]`:getLevel:is=`2`:then=`[+wf.wrapper+]`:else=`<li><a title="[+wf.title+]" href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>`+]

            - now I need to hide all the submenus in the non-active items. Do you think I can do this via assigning other template chunks to the wayfinder call?
              • 37758
              • 73 Posts
              thanks very much ottogal. I now seem to have success in terms of it writing out without the extra parameter. Unfortunately, though, not the desired result overall
              - I still don't get any joy with "$input", I need "$output" to give me the levels.
              - Once I have the levels, processing stops for the levels beyond 2. I think this is probably the way Wayfinder works, i.e. it's the [+wf.wrapper+] that gives me the lower levels, so I've change it to this now (notice the [+wf.wrapper+] in the is=2 condition

              [+wf.docid:limit=`0`+][+phx:input=`[+wf.docid+]`:getLevel:is=`2`:then=`[+wf.wrapper+]`:else=`<li><a title="[+wf.title+]" href="[+wf.link+]">[+wf.linktext+]</a>[+wf.wrapper+]</li>`+]

              - now I need to hide all the submenus in the non-active items. Do you think I can do this via assigning other template chunks to the wayfinder call?