Answer the question
In order to leave comments, you need to log in
[[+content_image]]
How to sort in descending or ascending order in getPage?
Sorting alphabetically works with &sortby=`{"pagetitle":"ASC"}`, but not by number.
[[!getPage?
&elementClass=`modSnippet`
&element=`getResources`
&limit=`18`
&showHidden=`1`
&tpl=`tovar`
&includeTVs=`image-tovar,old-price-tovar,price-tovar`
&where=`{"template":6}`
---------
&sortbyTV=`price-tovar`
&sortbyTVType=`integer`
&sortdirTV=`DESC`
---------
&parents=`2`
&includeContent=`1`
&hideContainers=`1`
]]
Answer the question
In order to leave comments, you need to log in
Since nobody answered wow, I found the answer here ->
https://modx.pro/help/7077/#comment-49733
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question