cclaerhout
Well-known member
Could you please add a random option to set the resources order inside the "getResources" function from the resources model (like you did for feature resources)? It will be useful for widgets.
Example:
Search:
Replace with
Example:
Search:
PHP:
$orderClause = $this->prepareResourceOrderOptions($fetchOptions, 'resource.last_update DESC');
Replace with
PHP:
if (!empty($fetchOptions['order']) && $fetchOptions['order'] == 'random')
{
$orderClause = 'ORDER BY RAND()';
}
else
{
$orderClause = $this->prepareResourceOrderOptions($fetchOptions, 'resource.last_update DESC');
}
Upvote
0