We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14796
    • 59 Posts
    I’m having a problem ordering the childgalleries. I wanted to order the galleries so the latest gallery shows up first. I used &childgalleries_order_direction=`ASC` which is the default. But this only orders the galleries half way. For instance I have four galleries, the first two being gallery 3 Then gallery 4 and the bottom two being gallery 1 Then gallery 2. This should be gallery 4 Then gallery 3 and gallery 2 Then gallery 1. Basically 3,4,1,2 but should be 4,3,2,1.

    When I use &childgalleries_order_direction=`DESC` it orders the galleries correctly: 1,2,3,4.

    I tried using the order_by=`id` instead of the default so it would look at the id numbers of the gallery pages and order by that, but it didn’t work.

    I’m using Maxigallery .5. and modx .95

    Has anyone else had this problem or maybe know a solution?
      • 7923
      • 4,213 Posts
      Child galleries are sorted by menuindex by default, so try:

      &childgalleries_order_by=`createdon` &childgalleries_order_direction=`ASC`


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 14796
        • 59 Posts
        That solved the problem. Thank you very much smiley