Can anyone confirm if the API code for any of the getTemplateVar/s/Output actually works... I've been beating my head against this all day with the following type of scenario:
Doc id 102 has a TV assigned to it via its template called "propertyLocation".
propertyLocation of doc 102 = "Dallas, TX"
The following code per the instructions in the documentation does not return anything as expected:
$pid = 102;
$result = $modx-> getTemplateVars('*');
for ($i=0;$i<count($result);$i++) {
$o.= $result[$i]['name']. ' = ' . $result[$i]['value'].'<br />';
}
$result2 = $modx->getTemplateVarOutput(array('propertyLocation'));
return 'result: '.$o.'<br />'.$result2['propertyLocation'];
It should return a key=>value pair plus the value in the propertyLocation TV, but it only returns emptiness:
| result: =
=
=
=
=
=
=
=
=
=
=
=