We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40122
    • 330 Posts
    For some reason, I just cannot get getResources to sort by menu index.

    I have tried:
    
    [[!getResources? &parents=`[[*id]]` &limit=`99`  &tpl=`menutmp` &includeContent=`1` &includeTVs=`1` &sortby=`menuindex`  &sortdir=`ASC` ]]
    
    


    And:


    [[!getResources? &parents=`[[*id]]` &limit=`99`  &tpl=`menutmp` &includeContent=`1` &includeTVs=`1` &sortby=`{menuindex:ASC}` ]]


    But I just cant get it to work. Does anyone know what I am doing wrong?

    Thanks
      • 38723
      • 165 Posts
      Quote from: meltingdog at Oct 14, 2013, 01:26 AM
      For some reason, I just cannot get getResources to sort by menu index.
      [[!getResources? &parents=`[[*id]]` &limit=`99`  &tpl=`menutmp` &includeContent=`1` &includeTVs=`1` &sortby=`{menuindex:ASC}` ]]


      You're probably missing some " in that call, this should work:

      [[!getResources? &parents=`[[*id]]` &limit=`99`  &tpl=`menutmp` &includeContent=`1` &includeTVs=`1` &sortby=`{"menuindex":"ASC"}`]]