We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42704
    • 29 Posts
    Hi all!

    So i'm setting up a gallery in MODX revo for a clothing lable to show off their products.
    Now I'm using Gallery for this "lookbook".
    I'm using the following script to call the album.

    [[!Gallery? &album=`lookbook` &toPlaceholder=`gallery` &plugin=`slimbox`]]
    [[+gallery]]


    When the user clicks on one of the pictures from the album, the browser opens the picture but not in overlay in lightbox.
    It redirects the user to the url from the picture itself.

    Now my question is: how can I make the picture show up in overlay? Like lightbox should work?

    I allready uploaded the lightbox scripts to my server and added the following code inside my template from the lookbook page
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/slimbox2.js"></script>
    
    


    Any ideas?
    thanks in advance!

    Simon
      • 42046
      • 436 Posts
      You don't need to include the slimbox2.js in the head, that's already taken care of by the slimbox plugin.

      Have you tried it with the slimbox plugin's own JQuery?

      &slimboxLoadJQuery=`1`
        • 42704
        • 29 Posts
        Okéy that did it! Thanks a lot!
        Now when i click the images, they show up in lightbox, but they show up way to big.
        Any ideas to make them show up smaller? Width: 400px or something?

        thanks in advance Dan!

        Really apreciate it!
          • 42046
          • 436 Posts
          I don't use the slimbox plugin myself, but looking at the code quickly it seems like you'll have to edit the css file which should be located somewhere like /assets/components/slimbox/css/slimbox2.css - or you could just make the images smaller.

          Edit: it's at /assets/components/gallery/packages/slimbox/css/slimbox2.css
            • 42704
            • 29 Posts
            My server gives me no permissions to change the file so I guess that isn't the solution...

            Pitty smiley

            thanks for helping me out tough
              • 42046
              • 436 Posts
              Can't you access it through the Modx file manager?
                • 42704
                • 29 Posts
                How do you do that? When I change something i always download the specific file and after editing i upload it on my server.
                  • 42046
                  • 436 Posts
                  In the menu tree on the left, the 'Files' tab.
                    • 42704
                    • 29 Posts
                    Thank you very much Dan! You just solved my problems.

                    If there is anything I can do for you. Drop me an e-mail!

                    Thank you!

                    Simon