Question

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

Was it helpful?

Solution

$modx->getTemplateVarOutput(array('TempVarName'), $arrPage['id']);

http://wiki.modxcms.com/index.php/API:getTemplateVarOutput

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top