Thanks for the great extension jason, it’s been super useful! One question I can’t seem to solve - is there any way to pass a group of resources into get resources and not sort them at all - meaning display them in the order they were already in. I’m putting some jquery on the front page of our site that shows featured items, most recent items, and highest rated items. featured and most recent are working beautifully, but the highest rated info is stored in a table that is not the main modx_site_content table within the db. And so I am passing the results of a query rows into get resources using a $HighestRatedGameIds array variable but would like it not to resort them by the publishedon field (or any other field for that matter). The code looks like this:
$highestRatedGameIds = "";
$stmt = $modx->query("SELECT star_id FROM modx_star_rating ORDER BY vote_total DESC");
if ($stmt) {
while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
$highestRatedGameIds .= $row['star_id'] . ",";
}
}
$getResourceParams = array(
'tpl'=>'sidebar_item_game',
'resources'=>$highestRatedGameIds,
'includeTVs'=>1,
'processTVs'=>1,
'tvPrefix'=>'tv_',
);
$output .= $modx->runSnippet('getResources', $getResourceParams);
Is it possible to make getResources not sort these, or to sort by a column in a table other than modx_site_content? Thanks a ton!