We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22897 ☆ A M B ☆
    • 209 Posts
    I have a document with 5 Template Variables associated with it.

    From a snippet called from the document’s content, I want to get the values of these 5 TV’s.

    I see 3 getTemplateVar type functions documented on the API quick reference, but the parameters are not clearly documented. Knowing only the documentIdentifier and the name of the template variable, is it possible to get the value?

    Otherwise I can pass in the values of these TV’s using parameters in the snippet, but that provides more opportunities for things to go wrong wink
      MAPLEDESIGN MODX development and MODX web design and custom development. Proud to serve UK and International clients!
      • 22303 MODX Staff
      • 10,725 Posts
      If you want the raw values and other metadata, getTemplateVars(); if you want the output they should render on a page, getTemplateVarOutput().