We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28673
    • 178 Posts
    Hi! I read the docs and also the API but I didn’t find anything usefu (I’m a newbe though). In the API, I see that the $modx object had some specific method to retrieve TVs, but they are now deprecated.

    So what are the new techniques? How can I use a TV in a snippet?

    Thank you smiley
      • 28673
      • 178 Posts
      SOLVED

      2 ways:

      1. (php)

      return $modx->resource->getTVValue(’TV name or ID’);

      2 (tag).

      pass TV as snippet param:

      [[my_snippet &my_tv=`[[*TV name]]` ]]

      Bye!