On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi,

    I'm trying to display only one large picture, randomly picked with MaxiGallery, and without the paging information.

    I assumed that I had to use the "pictureview" service, but it seems ignoring the "galleryOuterTpl" and "outerTpl" parameters, and is always calling the outer template stored in "galleryoutertpl.html".
    [!MaxiGallery? &lang=`fr-utf8` 
    &max_pic_size=`1024x720`  !]

    If no picture is available for the current document, I also would like some picture to be obtained from a gallery associated to any parent or child document.
    The "pictureview" service unfortunately seems to ignore the "gal_query_ids" and "childgalleries_level_limit" parameters.

    I have a working alternative, which is using the default thumbnails service of MaxiGallery to display the large picture, and to use the `pictureview` service to only display a "Manage pictures" button:
    <!--Printing some "Manage pictures" button -->
    &pictureTpl=`@FILE:assets/snippets/maxigallery/templates/manageButton.tpl` &css=`@FILE:` !]
    <!--Printing several large pictures instead of thumbnails -->
    [!MaxiGallery? &lang=`fr-utf8` 
    &manageOuterTpl=`CODE:` !]

    This works fine excepted that all pictures from the gallery are printed, which means too much bandwdith. Would there be a way to limit the number of pictures printed to only one?


    This question has been answered by BobRay. See the first response.

    • discuss.answer
      Try adding these to the tag:

      &order_by = `random`
      &limit = `1`
        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
      • Thanks a lot, Bob. That's it.
        The &order_by=`random` was already there, but I had missed the &limit=`1`.