Hello,
I would like to have the links inside a chunk/snippet work from a page outside of MODx. Is this possible?
My results from the code below are
http://localhost:8080/modxmg/[~11~] -> when using the chunk from a page outside of MODx
http://localhost:8080/modxmg/index.php?id=11 -> when the chunk is called from within MODx
$modx = new MODxAPI();
// connect to db and load settings
$modx->connect();
$modx->getSettings();
$menutop = $modx->getChunk('TopMenu');
//$menutop = $modx->runSnippet('TopMenuToo');
echo $menutop;
I would like to be able to have a friendly URL so I don’t want to hard code the index.php?id=11 into my files outside of the MODx site.