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

    Nothing I do seems to order the the child gallery thumbnails, I have searched and tried parameters from the wiki, I can get most thumbnails to move around as expected except for one. Here is what I currently have as my MG call:

    [!MaxiGallery? &display=`childgalleries` &pics_per_row=`4` &manageButtonTpl=`0` &order_by=`pos` &order_direction=`ASC` !] 



    This display my images in the following order:

    1
    2
    5
    3
    4

    5 seems to be the suspect thumbnail, can’t get it to work.

    Thanks
      http://www.blend.uk.com | Web Design by Blend
      • 7923
      • 4,213 Posts
      Childgalleries are ordered using &childgalleries_order_direction and &childgalleries_order_by parameters. You can then use the &order_by, &order_direction and &offset parameters to define what picture is get to the childgallery item. These parameters are documented in the wiki I believe..


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17717
        • 433 Posts
        Tried both and I can’t seem to alter the order. With the following parameter:

        &childgalleries_order_by

        How do I use this, this is from the wiki:

        Possible values:
        MODx document object field.

        Default value:
        menuindex

        Sorry, not sure how to alter using &childgalleries_order_by

        I have my main collection page in a folder, with all document below, in the correct order, i.e. collection 1, 2,3 etc. Here is the website:

        http://www.chriskasch.co.uk/work

        The 5th collection just won’t sit right.

        Thanks
        Lee
          http://www.blend.uk.com | Web Design by Blend
          • 7923
          • 4,213 Posts
          I don’t know what field you have sorted the document tree by, but with using the above parameter, you can give any of these fields as a value.

          for example &childgalleries_order_by=`createdon` would sort by created on date..

          Unless I have broken it at some point.. rolleyes


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 36624
            • 535 Posts
            hello,

            for me the use of &childgalleries_order_by=`pagetitle` is ok nothing is broken and it’s nice BUT i would like to know if it would be difficult to add support of Tv’s in that parameter ?

            because i need to sort my galleries with a custom Date field... ie : &childgalleries_order_by=`myDate`

              CTRL+SHIFT+U - Clear Cache
              CTRL+SHIFT+H - Hiding Heft Panel
              CTRL+SHIFT+N - Fast Create Resource
              CTRL+ALT+P - Preview Recource (in edit resorce window)
              CTRL+ALT+S - Save
              • 7923
              • 4,213 Posts
              It would require some work.. I’ll take a look at it some point. Please add it as feature request to MaxiGallery Trac site.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 36624
                • 535 Posts
                ok thx so i add a features request but now back from holidays i rethink of the problem and i find a solution with a maxigallery call inside a ditto call for listing the child gallery and after a little headache it works great ! laugh
                  CTRL+SHIFT+U - Clear Cache
                  CTRL+SHIFT+H - Hiding Heft Panel
                  CTRL+SHIFT+N - Fast Create Resource
                  CTRL+ALT+P - Preview Recource (in edit resorce window)
                  CTRL+ALT+S - Save
                  • 10534
                  • 40 Posts
                  I’m trying the same thing as you’ve tried here... I was wondering how you solved it with Ditto...
                  How can you get the same functionality (e.g. random gallery images etc) in combo with Ditto?

                  thnx!

                  //edit: I was referring to manu, not the topic starter
                    • 7923
                    • 4,213 Posts
                    You list the gallery documents with Ditto and in Ditto’s row template, you use MaxiGallery call with &view_gallery=`[+id+]` to get the pictures from the document that Ditto is currently listing.


                      "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                      • 10534
                      • 40 Posts
                      Well, I tried this, but what I’m getting is all the pictures within the galleries (childgallery). What I need is a just the listing as with &display=`childgalleries`.

                      tpl chunks I tested for ditto:
                      [[MaxiGallery? &display=`childgalleries` &order_by=`random` &view_gallery=`[+id+]`]] --> returns an error
                      [[MaxiGallery? &view_gallery=`[+id+]`]] --> returns all the items with the children grouped per gallery.

                      Or am I doing something wrong?