We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23703
    • 180 Posts
    I’m using a TV to specify a file to include on every page. This would be a perfect use for the @INHERIT binding, but I can’t get it to work.

    The value of the TV is read by a snippet (using $modx->getTemplateVars). But instead of looking at the parent document and inserting the TV from it, the string "@INHERIT" is read. It seems getTemplateVars reads the value literally instead of parsing(?) the binding first.

    Is there a solution for this? Or am I trying to do something not (yet) possible?
      • 1764
      • 680 Posts
      I believe what you need to do is to use getTemplateVarOutput instead of getTemlateVars. I think that should take care of it.
        • 23703
        • 180 Posts
        That did it. Superb!

        Thank you, Adam!
          • 32241
          • 1,495 Posts
          Just for clarification,

          The getTemlateVars will fetch the raw data/value being stored on the TV, while the getTemplateVarOutput is returning the end product/result/output that will be rendered to the page.
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media