We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22377 ☆ A M B ☆
    • 33 Posts
    I guess the title states my question, but here it it again, in detail:

    I want to be able to have two snippet calls to MaxiGallery on the same page, while using an embedtype other than smoothgallery (eg: slimbox).

    I looked around in the parameters section of the documentation but couldn’t find anything resembling a &gallery_id parameter, except for smoothgallery embed type, which is not appropriate for what i need in my project.

    While searching the forums i found hints of gallery ids being implemented in 0.6, but is it possible to do a workaround/hack for 0.5.1 to support this?

    As it stands now, if i have multiple calls to MG on the same page they will all defer to the same set of images, and managing one overwrites the images in the other as well.

    Am i missing something, is it not possible at all, or is there a work-around to it?

    EDIT: SOLLUTION: if other people have the same problem: sollution is a couple of posts below: just create the galleries on different pages in MODx, and use the &view_gallery parameter in the call on the initial page to display the gallery/galleries created on other pages.
    Then use different templates (galleryPictureTpl )for each gallery in which you modify the gallery rels like: rel="ligthbox[set1]" and rel="ligthbox[set2]". You can also use the &manage_target and &is_target parameters to manage the galleries on their respective pages, or on the initial page, as you see fit.

      • 7923
      • 4,213 Posts
      If 0.5.1 version had template support, it’s possible.

      You just need to do custom galleryPictureTpl to both calls and use rel="ligthbox[set1]" and rel="ligthbox[set2]" in the link tags to make the two go to their own picture sets. You must also use the &manage_target and &is_target parameters if you are going to manage the galleries from that page.



        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 22377 ☆ A M B ☆
        • 33 Posts
        Thanks for the reply, but it’s not working.
        BTW i am using 0.5.2 not 0.5.1, sorry for the mixup...

        I am using templates anyway and it was easy changing to rel="ligthbox[set1]" and rel="ligthbox[set2]", but it did not make any difference...

        I set up the galleries to be managed in a different document, using &manage_target and &is_target, but it still not working. (by not working i mean the same pictures show up in both galleries, and any change done to one of them via the gallery manager will reflect in the other one too).

        The gallery ID is the same with the page ID, that’s how maxigallery i think currently keeps track of different galleries - hence, all galleries on the same page will have the same ID, that equal to the page ID... Until we can set the gallery ID manually via a parameter, i for one don’t see a solution to this...

        Not really sure how to get around this. Help would be appreciated.
          • 7923
          • 4,213 Posts
          So have you created the two galleries in two different documents first? Each maxigallery is bound to one document.

          Then with the &view_gallery parameter, you can view those two separate galleries in one document and use the &manage_target parameter to make the picture management elsewhere (for example in the original gallery document).

          Then use the templates like I said above in the calls that have the &view_gallery parameter on the single document.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 22377 ☆ A M B ☆
            • 33 Posts
            Thank you, the &view_gallery parameter is what i was missing all this time. This solved the issue, perfectly.

            Actually i didn’t even have to put both galleries on other pages, the first one is on the page, and the second one on another page, linked with &view_gallery.

            You were very helpful, thank you.