Hi,
i build a simple migx (2.5.9) and want to sort it at the frontpage by a numeric field with:
[[!getImageList?
&tvname=`migx3`
&sort=`[{"sortby":"punkte","sortdir":"DESC","sortmode":"numeric"}]`
]]
The output is:
Array
(
[MIGX_id] => 4
[fahrername] => poliii
[fieldnameimage] => images/common/SC_Logo.jpg
[punkte] => 9
[_alt] => 0
[_first] => 1
[_last] =>
[idx] => 1
[property.tvname] => migx3
[property.sort] => [{"sortby":"punkte","sortdir":"DESC","sortmode":"numeric"}]
)
Array
(
[MIGX_id] => 3
[fahrername] => ijij
[fieldnameimage] => team.jpg
[punkte] => 1
[_alt] => 1
[_first] =>
[_last] =>
[idx] => 2
[property.tvname] => migx3
[property.sort] => [{"sortby":"punkte","sortdir":"DESC","sortmode":"numeric"}]
)
Array
(
[MIGX_id] => 2
[fahrername] => nr 2
[fieldnameimage] => bewegt-dich.jpg
[punkte] => 8
[_alt] => 0
[_first] =>
[_last] =>
[idx] => 3
[property.tvname] => migx3
[property.sort] => [{"sortby":"punkte","sortdir":"DESC","sortmode":"numeric"}]
)
Array
(
[MIGX_id] => 1
[fahrername] => lolop
[fieldnameimage] => gocart-neu.jpg
[punkte] => 12
[_alt] => 1
[_first] =>
[_last] => 1
[idx] => 4
[property.tvname] => migx3
[property.sort] => [{"sortby":"punkte","sortdir":"DESC","sortmode":"numeric"}]
)
so it's not sorted by "punkte". Any ideas why?
Best,
Mike
Update: Maybe it's related to
https://forums.modx.com/thread/77554/how-to-proper-use-sort#dis-post-429779 My PHP is 5.3.3-7. I will check this.
[ed. note: doggystyle last edited this post 12 years, 9 months ago.]