Hi everyone! How to get all childs of parent with specific template and set tv value through the console? Here is my beginning code:
<?php
if(!$docs = $modx->getCollection('modResource', array(
'template' => 11
))){return;}
foreach($docs as $doc){
$doc->setTVValue(2,'dir');
$doc->save();
}
Thanks in advance!