include snippet for MODX Revolution
if (empty($file)) return '';
$o = '';
$modx->parser->processElementTags('',$file,true,true);
$file = str_replace(array(
'{core_path}',
'{base_path}',
'{assets_path}',
),array(
$modx->getOption('core_path'),
$modx->getOption('base_path'),
$modx->getOption('assets_path'),
),$file);
if (file_exists($file)) {
$o = include $file;
} else { die('File not found: '.$file); }
return $o;