function tv($name)
{
$id = $modx->resource->get('id');
$tv = $modx->getObject('modTemplateVar', $name);
return $tv->renderOutput($id);
}
function tv($name)
{
global $modx;
$id = $modx->resource->get('id');
$tv = $modx->getObject('modTemplateVar', $name);
return $tv->renderOutput($id);
}function tv($name)
{
global $modx;
return $modx->resource->getTVValue($name);
}I just want to get the TV's content.
function tv($name) { global $modx; $id = $modx->resource->get('id'); $tv = $modx->getObject('modTemplateVar', $name); return $tv->renderOutput($id); }
It gives me the first tv of another page, no matter which name I give it /:
$tv = $modx->getObject('modTemplateVar', array('name' => $name));