We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 31640
    • 100 Posts
    At the moment i have a foto page where there is 1 thumbnail and when you click on it a lightbox opens.

    This is my code at the moment:
    [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` &max_thumb_size=`300` 
    &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
    [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999` 
    &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!]


    Now the customer wants to create several foto series. And every serie is a different lightbox.
    But all the thumbnails must be on the same page. How can i do this. I tries several things but did’t managed to succeed.
    Please need some help, and possible with a code snippet, this makes it always more easy to understand smiley


      • 7923
      • 4,213 Posts
      In your templates there is following line:

      rel="lightbox[set[+maxigallery.picture.gal_id+]]"
      


      Modify that for each gallery where you want different lightbox set. You can just write it statically to the templates for example:

      rel="lightbox[set1]"
      rel="lightbox[set2]"
      rel="lightbox[set3]"

      If you use the line at the top, each gallery will be in it’s own lightbox picture set.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 31640
        • 100 Posts
        And must it be done on the same page
        or
        do i have to change my foto page to a folder
        and put one childpage for every gallery i want to display???

        and how must it be coded

        I’m just asking for code snippets, not because i am lazy but because i can’t get this working
        and i tried a lot...

        Thanks a lot
          • 7923
          • 4,213 Posts
          One document can have one gallery. So if you want multiple galleries on a single document, you have to first create separate documents for each gallery, then in a single document use the &view_gallery or maxigallery query functions to get multiple galleries to show up in a single document.

          Then you implement custom templates for all the maxigallery calls in the single document. Or you can use just the default templates from wiki and each gallery will automatically be in it’s own lightbox picture set.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 31640
            • 100 Posts
            I make progress but i am not there yet...

            Still 2 questions

            I managed to get this working but:

            First of all
            my code on the page where you can open different lightboxes:

            [!MaxiGallery?  &gal_query_ids=`22` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
            &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
            [!MaxiGallery?  &gal_query_ids=`21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
            &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
            [!MaxiGallery?  &gal_query_ids=`22,21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999` 
            &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!] 
            


            But how can i make this more easy for my customer, beceause now she has to enter a new maxigallery entry for the specific gallery lets say 23, and she has to modify the existing maxigallery (hidden) entry to change the gal_query_ids.. This is difficult...

            Second thing, my two embedded gallery’s are not visible in the menu. So what do i have to do to see the manage pictures button of those pages. I can manually change the id in the url, again this is not eay for my customer

            Is there a much more simple way to achieve the same

            Thanks
              • 7923
              • 4,213 Posts
              1. You could do for example template variable that lists all documents (or just documents under certain parent) and your customer can choose the document from there for the maxigallery call. You could ask in some general support forums for help on how to do a template variable that lists certain documents in a dropdown and returns comma separated list of the selected document ids. Then just use that template variable in the maxigallery call and your customer don’t have to mess with maxigallery calls at all.

              2. You just need to make some link somewhere for the customer so he/she can go to the document and manage the pictures. Or if they use modx back end, you could take a look at the managermanager plugin to make picture management in back end.


                "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                • 31640
                • 100 Posts
                Thanks for the info i got the managermanager working... And it works great.

                Still some problems. Not really a problem, but it is still too difficult for my customer

                I Explain:

                There is a folder with the following code:
                [!MaxiGallery?  &gal_query_ids=`22` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
                &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
                [!MaxiGallery?  &gal_query_ids=`21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
                &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!] 
                [!MaxiGallery?  &gal_query_ids=`22,21` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999` 
                &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!] 
                


                Then on every document in that folder there is the following code to put one gallery on the document
                [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1` 
                &max_thumb_size=`300` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!]
                 [!MaxiGallery? &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999`
                 &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!]
                


                With this code there is a thumbnail with a slimbow for every document in the folder...

                When my customer needs to create a new document (gallery) she has to do 2 things that are too complicated:

                First off all she has to put the specific code on the new document...
                But that piece of code is always the same, is there a way to automatically insert the code in the documents created in the specific folder for the galleries.

                And the second item is allready mentioned, that is the fact that she has to modify the folder code: there she has to add:
                [!MaxiGallery? &gal_query_ids=`XX` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`1`
                &max_thumb_size=`250` &quality_pic=`100` &quality_thumb=`100` &galleryPictureTpl=`mgGalPicTpl`!]
                for the new gallery and she has to modify :
                [!MaxiGallery? &gal_query_ids=`22,21,XX` &display=`embedded` &embedtype=`slimbox` &order_by=`pos` &limit=`99999`
                &galleryPictureTpl=`mgGalPicTplHidden` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:`!]

                Is there a way to automate this proces, with TV like doze suggested

                but i didn’t really understand your previous hint doze, so can you explain a little further please...

                Hope you can help, because this is the last thing i need to fix to finish my first modx project smiley
                  • 7923
                  • 4,213 Posts
                  You could put the MaxiGallery code to some document template and use that template for the gallery documents.. then your customer doesn’t need to add them.. Or you can put it in a chunk and you customer only needs to add that chunk.. But if you need that the actual MaxiGallery code comes to the document, if it needs to be modified later or something, then you need to do a MODx plugin that will insert the code in to some document content field or to a TV when new document is created.

                  For the other thing, do the TV like I said in previous post.

                  You can ask more help about creating TV’s and plugins from general support forum.


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