Hi, i'm trying to show the content of a TV in some ditto results, only if the Template Variable exists. I've tryed some options but anyone gave me any result. This is the last code I tried in a snippet:
<?php
$myVar = $modx->getTemplateVarOutput(array('tvname'));
echo $myVar['tvname'];
?>
Let's say that the Template Variable name is "tvname"... And when I use this snippet, it doesn't return anything (And i'm sure that the TV has content).
I'm thinking that the problem is that i'm trying to use this in the results of a ditto and as $myVar appears many times, it crashes.
Any suggestion?
Thanks!