I think the most efficient method would be a custom snippet to select the resource IDs. That way, getResources doesn’t have to process anything but the selected resources and the resources won’t have to be retrieved just to test the TV values.
Something like this (untested):
[[!getResources?
&resources=`[[!SelectResources? &tvId=`7` &parentId=`5` &tvMinValue=`3` &tvMaxValue=`7`]]`
&tpl=`MyTpl`
]]
<?php
/* SelectResources snippet
*
* Returns a comma-separated list of selected
* resource IDs
*/
$min = $scriptProperties['tvMinValue'];
$max = $scriptProperties['tvMaxValue'];
$tv = $modx->getObject('modTemplateVar', $scriptProperties['tvId]');
/* get children of the parent */
$docIds = $modx->getChildIds($scriptProperties['parentId']);
foreach($docIds as $docId) {
$tvVal = $tv->getValue($docId);
if ($tvVal >= $min && $tvVal <= $max) {
$resourcesIds[] = $docId);
}
}
return implode(',', $resourceIds);
Once you have it working, you should be able to use getPage to format it as in the example here:
http://rtfm.modx.com/display/ADDON/getResources#getResources-SelectionProperties.
You might have to play with which snippets are cached or uncached and/or the getPage caching properties.