Answer the question
In order to leave comments, you need to log in
Sorting by tv field?
Good afternoon!
Please tell me who implemented sorting by tv field via xPDO. I can’t do sorting through the getresources snippet, because it’s a complex data output + additional sorting.
$searchFilter = '["most_view":"DESC"]';
$where = array('parent' => $id, 'deleted' => 0, 'where' => $searchFilter);
$resources = $modx->getCollection('modResource', $where);
This design does not work.
PS The name of the TV field is most_view (numeric field).
Thank you very much in advance!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question