Somebody posted a snippet (sorry, don’t remember who :/ ) called GetChildID, which I saved on my HDD but have been unable to find back on the forums (even with google...) :
<?php
$docid = (isset($docid)) ? $docid: $modx->documentIdentifier;
$children= $modx->getActiveChildren($docid, 'id', 'ASC');
foreach($children as $value){
if($value['pagetitle']==$childsName){
$childsID= $value['id'];
return $childsID;
break;
}
}
?>
but it doesn’t seem to work (nested or not).
What I need is a snippet which does exactly the opposite of UltimateParent, e.g a way to use as a nested snippet to automate the startID of a Ditto or DropMenu query.
This startID is two level *deeper* than the current document.
Can anyone help me ?
Thanks !