I want use getResources with sortby=`menuindex` but not working and i don’t see for why
[[!getResources? &resources=`4,8,5,6,7,9` &tpl=`contenuPageInterieurViaHome` &includeContent=`1` &sortby=`menuindex`]]
the order in the menuindex is = 4,8,5,6,7,9
but the order of the ressource in html is 9,4,5,7,6,8
it does not take into account the value of sortby
Thanks for your Help
Laurent
I think sorting by menuindex only makes sense, if you have the resources under one parent. If you include resources from different parents, each resource could have the same menuindex and sorting would not be possible. But beside that, try to add &sortdir=`ASC` to your call. Default is DESC.
All the resources are in the level 0, in the same parent.
i tried with sortDir=`ASC` but not work.
i tried also sortdir
but i want order the resource with menuindex
all my ressource are in the same level.
i verified all the menuindex. all different.
i use modx revo 2.0.4 -pl2 with getresources version 1.2.2 pl
-
MODX Staff
- 10,725 Posts
Are you using MySQL 5.0.51a by chance?
my server using : mysql version 5.0.90-log
php version 5.2.13
Client APi version 5.0.32
PDO Driver for Mysql, client library version :5.0.32
i see this in modx info system
work fine,
i had no specify the both, sortby=`menuindex` and sortdir=`ASC`
Thanks a lot for your Help
Laurent