You are not using really the benefits of XPDO when you just passing Querys to xpdo->query()
You could use instead the "MODx way" to get this resources like that, with the Use of getCollection, getCount
<?php
// Issue queries against the foreign database:
$conditions = $modx->newQuery('modResource');
$conditions->where(array('parent' => 7));
// getPage Stuff
$total = $modx->getCount('modResource', $conditions);
$modx->setPlaceholder('total', $total);
$conditions->limit($limit, $offset);
$conditions->sortby('pub_date', 'DESC');
$output = '';
$resources = $modx->getCollection('modResource', $conditions);
foreach ( $resources as $resource){
$row = $resource->toArray();
$properties['usaLocation'] = $row['pagetitle'];
$properties['usaDescription'] = $row['description'];
$properties['usaDate'] = $row['pub_date'];
$properties['usaURL'] = $row['content'];
$output .= $modx->getChunk('usaNews',$properties);
}
return $output;
just write it down, hope that there are no typos