Great-Antique, да, типа того.
вобщем никаких готовых решений я не нашел, пришлось рожать код.
кому надо, вот:
// создание шаблона
$table_name = $modx->getFullTableName( 'site_templates' );
$fields = array('templatename' => 'TemplateMan', //name template
'description' => 'template for user', //description template
'content' => '{{header}}{{sidebar}}[*content*]{{footer}}' //content template
);
$template_id = $modx->db->insert( $fields, $table_name );
// создание TV
$table_name = $modx->getFullTableName( 'site_tmplvars' );
$fields = array('type' => 'text', //type TV
'name' => 'tvFIO', //name TV
'caption' => 'ФИО', //caption TV
'description' => 'fio for user' //description TV
);
$tv_id = $modx->db->insert( $fields, $table_name );
// создание связки шаблона и TV
$table_name = $modx->getFullTableName( 'site_tmplvar_templates' );
$fields = array('tmplvarid' => $tv_id, //id TV
'templateid' => $template_id //id Template
);
$modx->db->insert( $fields, $table_name);
что-то типа такого, надеюсь кому-то да пригодится.