We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3296
    • 16 Posts
    Here I go again. Learning as I go along.
    I have 3 diffrent photogalleries using maxigallery and slidebox
    http://desertmessenger.myphotos.cc/modx/index.php?id=47
    What I’m not sure of is how to get 1 thumbnail photo from each diffrent gallery to display in the sidebar. each photo will change whenever the page is visited.
    Is there a process to create a seperate template and from that create a snipit to maker this happen?
    Slowly making things work...
    If I can figure out how to do this step, then the next project I’ll be able to apply this to allow rotation of the photo in the header of the website.
      • 3749
      • 24,544 Posts
      I have a page that displays a random photo picked from all of the galleries at the site. The photo is a link to its gallery. I’m not sure if you can have multiple MG tags on the same page or not (I don’t think so). If you can, you’d just have three of each of these and specify the gal_query_ids (a single ID) in each of them. If not, this might be the best alternative.

      The only thing in my template is:

      {{MaxiGalleryRandomPhotoChunk}}


      Here’s the chunk:

       [[MaxiGallery? &gal_query_ids=`all` &query_level_limit=`5` &order_by=`random` &limit=`1` &pics_per_row=`1` &max_thumb_size=`110`  &thumb_use_dropshadow=`1` &galleryPictureTpl=`mgPicture`]]


      Here’s the mgPicture chunk:

      <div class="picturecontainer">
      <a href="[~[+maxigallery.picture.gal_id+]~]"><img id="maxImage" src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.picture.title:htmlent+]" /></a>
      	<p id="maxTitle">[+maxigallery.picture.title:htmlent+]</p>
      	<p id="maxDescr">[+maxigallery.picture.descr:htmlent+]</p>
      </div>


        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 7923
        • 4,213 Posts
        You can also have 3 separate calls on the document. You can query the picture with gal_query_ids parameter or view_gallery parameter. Just make sure that you use &manage_target parameter to make the picture management on separate documents (for example the original gallery documents) that has only one snippet call running on the page. Or use the disable manager hack (linked in the sticky topic, under todo section). Or just hide the manage pictures buttons from the galleryOuterTpl if you do not need to manage the pictures from the random images call.

        The only limit of maxigallery is that when managing a gallery, you can only have one snippet call running on that page. That’s why there is the &manage_target parameter what you can use to tell maxigallery that what document is used to manage the gallery and that document should only have one call running.


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