@mephissto: Nope tha did not do the trick ider i tryed this:
$content = $modx->parseDocumentSource($document[’content’]);
i get raw unparsed data.
@Bruno17: I tryed that but somhow it did not do the trick because i do not want a blank template.
so i tryed a variation of your id by dooing the foloing:
$url = $modx->makeUrl("147", '', '', 'full')."?docId=".$doc_id;
$content = file_get_contents($url);
one page 147 I have a snippet called getcontent:
<?php
if(isset($_GET['docId'])){
$doc_id = $_GET['docId'];
$document = $modx->getDocument($doc_id);
$content = $document['content'];
}else{
$content = "Sorry no id";
}
return $content;
?>
when I call that page from the browser direct then the page is parsed and i see parsed content somehow this does not work when i call it from the php file.
if I type some plain text in doc id147 contentfield then I see that plain text.
mm maybe I know what the problem is... the page is protected and apache (file_get_contents() ) is not logged in.
mm big problem...