We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29635
    • 361 Posts
    Anybody have any ideas on how to fix Wayfinder to be able to use the &ph parameter in an uncached snippet call? (If this has been brought up before, sorry. I couldn’t find anything anywhere.)

    In other words, this works:
    [[Wayfinder? &startId=`3` &ph=`nav` ]]
    [+nav+]
    

    This doesn’t (doesn’t output *anything*):
    [!Wayfinder? &startId=`3` &ph=`nav` !]
    [+nav+]
    

    The problem is that I need to use [[UltimateParent]] for the startId. So after much head scratching, it’s PHx to the rescue:
    [[Wayfinder? &startId=`[+phx:if=`[[UltimateParent]]`:ne=``:then=`[[UltimateParent]]`+]` &ph=`nav` ]]
    [+nav+]
    

    The PHx method works for the time being, but it’s obviously not as ideal as Wayfinder working uncached. Thoughts?
      Need MODx Ecommerce? Try FoxyCart!
      • 11975
      • 2,542 Posts
      Hi,

      have you tried the latest release of PHx (2.1.3).
      It seems that the issue with placeholders and uncached call has been fixed.

      :-)
        Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
        • 11975
        • 2,542 Posts
        Hmmm.... forget my answer

        I had disabled PHx smiley

        the issue with placeholders is still here
          Made with MODx : [url=http://www.copadel.com]copadel, fruits et l
          • 22303 MODX Staff
          • 10,725 Posts
          You cannot dynamically set the value of placeholders on cacheable pages using uncached snippets. The only way that would work is if the placeholders are embedded within the content returned by the uncached snippet or another uncached snippet.
            • 29635
            • 361 Posts
            Thanks for the clear explanation, Jason. I figured it might be something bigger than Wayfinder, but couldn’t make sense of it.
              Need MODx Ecommerce? Try FoxyCart!