Lack of interest Random resources (order clause)

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

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:
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
This suggestion has been closed. Votes are no longer accepted.
Back
Top Bottom