Ok, I'm having a problem - I have a one-line-list TV with template IDs. In my plugin which fires on OnDocFormRender I get it with:
$parent = $modx->getObject('modResource',$id);
$ct = $parent->getTVValue('templateTV');
if (isset($modx->controller)) {
$modx->controller->setProperty('template', $ct);
} else { // modX < 2.2.0
$_REQUEST['template'] = $ct;
}
and because of the second line
$ct = $parent->getTVValue('templateTV');
the gallery OnTVOutputRenderList somehow fires and outputs a path (in screenshot). I can comment out the if part but the problem is still there.
I checked the getTVValue function and it calls the OnTVOutputRenderList event. What am I missing?
Sumoborac