I've got a problem with modx evo (1.0.15). I wanna get resource by id in my snippet. Snippet call looks like this:
[[byid? &id=`3`]]
and proccessing looks like this:
$name = 'modResource';
$criteria = array('id' => $id);
$document = $modx->getObject($name,$criteria);
print_r (var_dump($docArray));
I tried this
$resource = $modx->getObject('modResource', $id);
and this
$resource = $modx->getObject('modResource', 3);
all these variants gave me NULL. What am I doing wrong?