I must have been half-asleep thinking there was a @SNIPPET binding parameter, although I think there should be
Try this out, although I still think this can be done much easier with PHx if someone can post an example ...
Your snippet, let’s call it ’myDocSelector’:
<?php
// Evo 1.02
// returns all child ids contained in a given resource
// assign your top parent id to the &parentid parameter of your snippet.
$parentid = (isset($parentid)) ? $parentid : 0 ;
$ids = $modx->getChildIds($parentid, 0);
// ... filter or format $ids array to suit your needs ... //
$return = http_build_query($ids, '', '||');
$return = str_replace('=', '==', $return);
return urldecode($return);
?>
Your template variable, in the Input Option Values area:
@EVAL return $modx->runSnippet('myDocSelector', array('parentid', 15));
Let me know if this is what you had in mind.
-Mike