Hi,
I would love to know if there is a quick way to retrieve the content (not rendered), of a given document in a snippet? I’m exploring the documentation for something like that, and I think that there is no easy way to do it. If I’m right and it means that I need to do my SQL queries by hand, here is a suggestion to add to the MODx API :
Add something like this to the $modx object :
$modx->getDocumentData(id)['content,title,longtitle,etc.'];
And while adding it, why not add stuff like this :
$modx->createDocument(parentid, properties, TV_values, content);
where :
*
parentid would be the ID of the parent of the new document
*
properties would be an associative array to pass values to the different document properties
*
TV_values would be another associative array to pass values to the template TVs
*
content would be a string to store the content of the document
That was my question and suggestions!
thanks a lot,
Blaise