BobRay Reply #2, 22 hours, 6 min ago
You don't need to involve xPDO in any way, and if you're running it as a snippet, It should work just like it is. Just put a tag for the snippet on a page and preview the page (but don't do it more than once).
If you want to run it outside of MODX, you just need to include this code at the top with the correct path to your MOD core:
<?php
if (!defined('MODX_CORE_PATH')) {
$outsideModx = true; // optional -- for your own use.
/* put the path to your core in the next line to run outside of MODx */
define(MODX_CORE_PATH, 'c:/xampp/htdocs/test/core/');
include_once MODX_CORE_PATH . '/model/modx/modx.class.php';
$modx= new modX();
$modx->initialize('mgr');
}
[ed. note: rethrash last edited this post 11 years, 7 months ago.]