This question has been answered by dubbs. See the first response.
$query->where(array(‘id:!=‘ => array([[*fetchedLIST]])));
Could you use 'where' query? In effect something like...
$query->where(array(‘id:!=‘ => array([[*fetchedLIST]])));
https://docs.modx.com/xpdo/2.x/class-reference/xpdoquery/xpdoquery.where
I'd have thought you'd use &parents rather than &resources and then apply the 'where'. I'm not sure what the syntax would be for the query though, especially with a custom tv - maybe you'll need a snippet?
&resources = `-[[GetFetchedList]]`
/* GetFetchedList snippet */ $docs = $modx->resource->getTTValue('fetchedLIST'); return str_replace(','. ',-', $docs);
I think this might do it:
&resources = `-[[GetFetchedList]]`
/* GetFetchedList snippet */ $docs = $modx->resource->getTVValue('fetchedLIST'); return str_replace(','. ',-', $docs);
The snippet result will be cached, so it probably won't work correctly if the getResources tag is on multiple pages where the TV has different values. In that case, I think an uncached custom snippet that either gets the resources directly (best if the getResources tag is simple) or calls getResources with $modx->runSnippet() would work.
I could probably knock it out for you if I can see your full getResources tag.
[[getResources? &parents=`49` &tpl=`ItemTpl` &depth=`1` &limit=`9999999999` &includeTVs=`1` &processTVs=`0` &tvPrefix=`` &sortby=`RAND()` &showHidden=`1` &resources=`-[[GetFetchedList]]` ]]
$page = $modx->getObject('modResource', 48); $docs = $page->getTVValue('fetchedLIST'); $docs = str_replace(",", ",-", $docs); echo $docs;
[[!getResources? &parents=`49` &tpl=`elementTpl` &depth=`1` &limit=`9999999999` &includeTVs=`1` &processTVs=`0` &tvPrefix=`` &sortby=`RAND()` &showHidden=`1` &resources=`-[[!getfetchedList]]` ]]