Was there a change to the getTemplateVarOutput API in 0.9.5? I was using 0.9.1 with the following code in a TV, which calls the value of the current doc’s TVs and uses those values in a DB query. There’s no errors, but I have a duplicate of the original DB that matches many items on many docs, in 0.9.5 there are no matches on any documents.
@EVAL
$pagetitle=$modx->documentObject[’pagetitle’];
$longtitle=$modx->documentObject[’longtitle’];
$id=$modx->documentIdentifier;
$tvnames=array(’MFG’,’MFG2’);
$tvoutput=$modx->getTemplateVarOutput($tvnames, $id, 1);
$MFG = $tvoutput[’MFG’];
$MFG2 = $tvoutput[’MFG2’];
return $modx->db->query("SELECT name FROM db_table WHERE (manufacturer LIKE ’$MFG’ OR manufacturer LIKE ’$MFG2’)");
A couple posts touch on this topic and are probably how I figured this out originally (but are before 0.9.5 release?):
http://modxcms.com/forums/index.php/topic,1781.0.html
http://modxcms.com/forums/index.php/topic,4563.0.html