We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3006
    • 32 Posts
    I know there was a random-plugin before that you used to show one random picture from the gallery but i believe this is implented in MaxiGallery now, right?

    Anyway, is something of this possible? What call to use if so?

    Display 1 (or maybe 3-4) random pictures from newest galleries, random picture from all galleries and most viewed image (??)?

    I tried "order_by=" but i didnt figure out how to specify the gallery to grab from.. maybe i missed it in the wiki cause im tired now but if you could, please help me here smiley

    Thx
      • 7923
      • 4,213 Posts
      Have you checked these: http://wiki.modxcms.com/index.php/MaxiGallery#Query_examples

      It’s not possible to query for the most viewed picture as the view count isn’t saved by MaxiGallery.

      It’s also not possible to query pictures by gallery creation date straight away, you’d need to do a snippet to retrieve the document id’s of the newest galleries (in a comma demilimited list) and then use:

      [!MaxiGallery? &gal_query_ids=`[[YourSnippet]]` &order_by=`random` &limit=`4`!]

      One random picture from all galleries:

      [!MaxiGallery? &gal_query_ids=`all` &order_by=`random` &limit=`1`!]



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