I
I
Ivan Ivanov2018-09-12 13:44:55
MODX
Ivan Ivanov, 2018-09-12 13:44:55

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

1 answer(s)
I
Igor, 2018-09-23
@ig0r74

Need to make leftjoin tables with TV.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question