We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Hi,

    What is the order criteria for listing of the photo galleries.

    How do I change it?

    Edit: I use now [[MaxiGallery? &display=`childgalleries` &order_by=`date` &order_direction=`DESC`]] but makes no sense.

    I am looking at created time and edited time in the manager but they do not match.

    What do I have to do to arrange the galleries on the date it was created.

    Thx
      • 7923
      • 4,213 Posts
      I guess you mean childgallery display style?

      That can be sorted by using &childgalleries_order_by and &childgalleries_order_direction parameters.

      &order_by=`date` &order_direction=`DESC` sorts the pictures in the gallery (ie. the picture that comes as a first picture in the childgallery view.

      Date field in the picture details is the date when the picture was taken (extracted from EXIF data if possible), else it’s the date when the picture was uploaded.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 5340
        • 1,624 Posts
        I tried using

        [[MaxiGallery? &display=`childgalleries` &childgalleries_order_by=`pub_date` &childgalleries_order_direction=`DESC`]]’

        but there is no change if I use ASC.

        Am I missing something?
          • 7923
          • 4,213 Posts
          Is the document set to non cacheable? if not, use uncached snippet call, eg. [!....!]


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 5340
            • 1,624 Posts
            I cleared the cache but no effect

            If I use [! the tag is not parsed. I get [!MaxiGallery? &display=`childgalleries` &childgalleries_order_by=`pub_date` &childgalleries_order_direction=`DESC`!] in the window

            Is ’pub_date’ a usable parameter?
              • 7923
              • 4,213 Posts
              pub_date should be ok as it is a field in MODx document object. Can you check from the database table that is the pub_date value set in the documents?

              And try if it works ok with "createdon" field.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 7455
                • 2,204 Posts
                if you set this order by parameter does maxigallery also hoer that setting when dragsorting the images?
                and when uploading what is the order of inserting them in the db?
                random or by filesize or by name?
                  follow me on twitter: @dimmy01
                  • 7923
                  • 4,213 Posts
                  I guess you are talking about image sorting now.. not childgalleries sorting..

                  By default maxigallery uses pos and date fields for image sorting.. so it would be either the date of the upload or the date found in picture exif data (or pos value if you have set it). if you want to sort the images by some field and also position field use &order_by=`pos,title` for example. That would sort the pictures first by the picture position field, then by the title field.

                  Drag & Drop sorting essentially just sets the value of the picture position field.


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."