Спасибо — это мне дало понять, что это условие надо вызывать не внутри Smarty, а в самом начале в файле base.php, где начинается подключение шаблона.
<?php $properties = $modx->resource->getOne('Template')->getProperties(); if(!empty($properties['tpl'])){ $tpl = $properties['tpl']; } elseif($request.serial == 'CM') $tpl = 'index2.tpl'; else{ $tpl = 'index.tpl'; } if ($modx->resource->cacheable != '1') { $modx->smarty->caching = false; } if(!empty($properties['phptemplates.non-cached'])){ $modx->smarty->compile_check = false; $modx->smarty->force_compile = true; } return $modx->smarty->fetch("tpl/{$tpl}");
Только теперь надо копать в сторону, как правильно получить значение из поле сериал.
elseif($request.serial == 'CM') $tpl = 'index2.tpl';
Потому что так, он явно не понимает, где это поле «serial».