Reputation: 9351
I am using modx evo 1.0.2. I have resource id. Now i wanted to get a template var of this resource.
I have array of resource ids. I am getting resource by its id like this:
$objResource = $modx->getDocumentObject('id',$arrPage['id']);
Now i want to get a template variable of this resource. I have tried like this:
$objResource->getTemplateVarOutput('TempVarName');
it was not working. What will be the proper way to get tvValue from a specific resource?
Any suggestion will be helpful .
Thanks
Upvotes: 0
Views: 1226
Reputation: 3146
$modx->getTemplateVarOutput(array('TempVarName'), $arrPage['id']);
http://wiki.modxcms.com/index.php/API:getTemplateVarOutput
Upvotes: 1