For one it may (and I've seen it do that in older versions) execute the [[$tplA/b]] tags in the options, storing the result of the chunk as the value in the database
this would be news for me. Had never issues using this technique.
I don't think, tags in input-options are parsed, before showing them in the manager.
Can't see anything which would parse the tags in input-options here:
<?php
/**
* @package modx
* @subpackage processors.element.tv.renders.mgr.input
*/
class modTemplateVarInputRenderListbox extends modTemplateVarInputRender {
public function getTemplate() {
return 'element/tv/renders/input/listbox-single.tpl';
}
public function process($value,array $params = array()) {
$options = $this->getInputOptions();
$items = array();
foreach ($options as $option) {
$opt = explode("==",$option);
if (!isset($opt[1])) $opt[1] = $opt[0];
$items[] = array(
'text' => htmlspecialchars($opt[0],ENT_COMPAT,'UTF-8'),
'value' => htmlspecialchars($opt[1],ENT_COMPAT,'UTF-8'),
'selected' => strcmp($opt[1],$value) == 0,
);
}
$this->setPlaceholder('opts',$items);
}
}
return 'modTemplateVarInputRenderListbox';
public function getInputOptions() {
return $this->tv->parseInputOptions($this->tv->processBindings($this->tv->get('elements'),$this->modx->resource->get('id')));
}
public function parseInputOptions($v) {
$a = array();
if(is_array($v)) return $v;
else if(is_resource($v)) {
while ($cols = mysql_fetch_row($v)) $a[] = $cols;
} else if (is_object($v)) {
$a = $v->fetchAll(PDO::FETCH_ASSOC);
}
else $a = explode("||", $v);
return $a;
}
Secondly you can get scoping issues where the placeholders are not available in the chunk unless you specifically pass them like [[$tplA? &pagetitle=`[[+pagetitle]]`]].
I think [[$tplA]] in a tpl does work
the parser replaces the chunk-tag in the first loop, in the next loop it replaces the resulting getResources-placeholders, if I'm not wrong.
I know, this is working in bloX-tpls