define('MODX_PATH','/path/to/modx/'); define('MODX_API_MODE', FALSE); require_once MODX_PATH.'config.core.php'; require_once MODX_CORE_PATH.'model/modx/modx.class.php'; $modx = new modX(); $modx->initialize('mgr');
$modx->getChunk('chunkname');
This question has been answered by chrisissorry. See the first response.
[[yourSnippet]]
[[snippet]]
echo $modx->getChunk('myChunk');
2012-11-14
[[mySnippet]]
<?php return date('Y-m-d');
[[!mySnippet]]