you can try
@EVAL return $modx->runSnippet('getResourceList');
with a snippet like that:
<?php
$ids = $modx->getChildIds(0,2,array('context' => 'web'));
$c = $modx->newQuery('modResource');
$c->sortby('pagetitle','ASC');
$c->where(array('id:IN'=>$ids));
if ($collection = $modx->getCollection('modResource',$c)){
foreach ($collection as $object){
$options[] = $object->get('pagetitle').'=='.$object->get('id');
}
}
return implode('||',$options);
?>
[ed. note: Bruno17 last edited this post 14 years, 5 months ago.]
there was a typo in $c = $modx->newQuery('modResource');
now try it again.
something is still off. the snippet is not outputing anything. I placed the getResourceList snippet on a page and it is blank.
sorry, there was another little bug in the snippet.
But now it should do it.
Bruno, no need to be sorry, you have been a great help and didn't have to do any of it.
This latest iteration works great. Thank you so much for your help. I spent at least two days trying to get @SELECT to do what I wanted it to do.
-Brian