Quote from: thiswayup at Nov 10, 2010, 12:25 PM
Hi
I’m trying to get a TV from a specific doc but Im not sure what Im doing this right. Here’s my code that I read from some other post here.
$docObj = $modx->getDocument($docId);
$outlink = $modx->resource->getTVValue('outlink');
If you want it from a specific Resource, simply do this where $docId is the id of the Resource you want the value from...
<?php
$outlinkTV = $modx->getObject('modTemplateVar', array('name' => 'outlink'));
$outlink = $outlinkTV->renderOutput($docId);
?>