Alright so basically what I am attempting to do is;
I have a snippet which is called from a js script when the onlick function is added to a link.
The link is clicked and the content is then rendered to a <div></div> area.
This works 90% except that I cannot get modx to PARSE the output. As in, no snippet/chunk/tv/etc calls are parsed. They simply appear as {{bleh}} or [!snippet!].
This is the code I’m using to ATTEMPT to parse the output.
<?php
$docID = $_POST['id'];
$doc = $modx->getDocument($docID, 'content', 1);
$cont = $doc['content'];
$content = $modx->parseDocumentSource($cont);
return $content;
?>