We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1526
    • 72 Posts
    In my homepage I want to set a slideshow like a preview of the inside galleries, showing the first image of each gallery.
    I tryied with MaxiGallery v2, with the parameters:
    [!MaxiGallery? &display=`embedded` &embedtype=`smoothgallery`
    &max_pic_size=`490x300` &gal_query_ids=`all` &pic_query_ids=`1`
    &smoothgallery_embedLinks=`false` &smoothgallery_showArrows=`false`
    &smoothgallery_showCarousel=`false` &smoothgallery_showInfopane=`false`
    &smoothgallery_timed=`true` &smoothgallery_width=`490` &smoothgallery_height=`300`
    &smoothgallery_delay=`3000` &smoothgallery_fadeDuration=`600`!]

    I thought that &gal_query_ids=`all` had to go through all the galleries, and &pic_query_ids=`1` should choose only the first images.
    But this doesn’t work as expected, as it shows all the images of all the galleries.
    What’s wrong?
    As an alternative, how to show one random image from each gallery?
    Thank you
      MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
      <°'iiii);
      • 7923
      • 4,213 Posts
      Quote from: andrearicci at Feb 04, 2010, 09:58 AM
      I tryied with MaxiGallery v2, with the parameters...
      Umm... What’s maxigallery v2? You should be using the v0.6 test version.

      In any case.. this is littlebit harder to implement.. But I think you could do it by using childgalleries display type and then create custom galleryOuterTpl where you edit the smoothgallery part so that it comes from the childgalleries and then put needed smoothgallery code to custom childgalleryTpl based on the code what’s in galleryPictureTpl.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 7923
        • 4,213 Posts
        Try something like this:

        galleryOuterTpl chunk:
        <div id="myGallery[+maxigallery.config.smoothgallery_id:isnot=`-1`:then=`[+maxigallery.config.smoothgallery_id+]`:else=`[+maxigallery.pageinfo.id+]`+]">
        [+maxigallery.childgalleries+]
        </div>
        


        childgalleryTpl chunk:
        <div class="imageElement">
        <h3>[+maxigallery.pageinfo.pagetitle:htmlent+]</h3>
        <p>[+maxigallery.pageinfo.longtitle:htmlent+]</p>
        <a href="[+maxigallery.childurl+]" title="[+maxigallery.strings.go_to_gallery+]" class="open"></a>
        <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" />
        <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" />
        </div>
        


        Then in your snippet call, use &galleryOuterTpl=`yourchunkname` &childgalleryTpl=`yourchunkname` &display=`childgalleries` &embedtype=`smoothgallery`

        Not sure if it works straight away though, but try it out.. If you have problems with this, post a link to an online page with the setup, if possible.


          "He can have a lollipop any time he wants to. That's what it means to be a programmer."
          • 1526
          • 72 Posts
          Yes, sorry, it’s v0.6 test.
          Wow, I thought it could be driven by &pic_query_ids and &gal_query_ids.
          I’ve not time at the moment to try, but I’ll let you know as soon as I do something.
          Many many thanks for all.
            MODx evo 1.5~1.6 ✪ Apache v 2.2.22 ✪ PHP v 5.3.10 ✪ MySQL v 5.1.61
            <°'iiii);