I like to use a snippet (that I place in document A) to load content of document B and display it.
If it would be only HTML, it would be easy to load like that using the snippet:
$docdata = $modx->getDocument($docid, 'content', 1);
return $docdata['content'];
However, the document resource loaded contains snippets itself. And those will not be executed but rendered as plain text only.
How can I:
1. load the content and
2. force the execution of the snippets thereafter.
---
This does not work:
$docdata = $modx->getDocument(1234, 'content', 1);
$output = $modx->parseDocumentSource($docdata['content']);
$output = $modx->rewriteUrls($output);
return $output;