$docs = $modx->getCollection('modResource', array('class_key' => 'modDocument'));
$newValue = 'something';
foreach($docs as $doc) {
$doc->set('fieldName', $newValue);
$doc->save();
}If you know what resource field(s) you want to update and you want to update all documents, you can just do something like this in a snippet:
$docs = $modx->getCollection('modResource', array('class_key' => 'modDocument')); $newValue = 'something'; foreach($docs as $doc) { $doc->set('fieldName', $newValue); $doc->save(); }
$docs = $modx->getCollection('modResource', array('parent' => 'xyz'));UPDATE modx_site_content SET class_key = 'Taxonomy' WHERE parent = xxx