How do I get a template variable caption from the API? - Tried this but it doesn't work...
$caption=$modx->getObject('modTemplateVar', array('caption' => $tv));
Any help would be much appreciated... Thanks
$caption = $modx->getObject('modTemplateVar', array('name'=>'name_of_tv'))->get('caption');
Quote from: robh76 at Aug 05, 2018, 07:26 AMHow do I get a template variable caption from the API? - Tried this but it doesn't work...
$caption=$modx->getObject('modTemplateVar', array('caption' => $tv));
Any help would be much appreciated... Thanks
Hi Rob,
$caption = $modx->getObject('modTemplateVar', array('name'=>'name_of_tv'))->get('caption');
Perfect... Thank you so muchNps, you're welcome