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>
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."