We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35120
    • 9 Posts
    I’m curious how to get a lightbox working with some images. I set it up in the template how it should be, added the rel tag properly to the link, but it’s not working. Clicking a thumbnail just opens the larger picture rather than lightboxes it. Am I doing something wrong or modx not play well with lightbox?

    I’m trying to avoid using a gallery package of any kind, I just want a lightbox. Any ideas?
      • 33968
      • 863 Posts
      Which lightbox are you using? Have you included it in your template, along with jQuery or whatever javascript library it uses?
        • 35120
        • 9 Posts
        Using lightbox 2.05. I have included everything like I’m supposed to. The dummy html test page I setup works just fine but then when I put the stuff into modx it doesn’t work.
          • 26503
          • 620 Posts
          Check your source in the modx pages, displaying the image that is supposed to be in the lightbox is a classic "no javascript loaded" issue.

          My guess it is just paths that you are having issues with.

          -sean
            *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

            Sean Kimball CLP, CLS.
            Technical Director / Sr. Developer | BigBlock Studios
            ._______________________________________________.
            Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
            27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
            phone/fax: 905-426-5525
            • 35120
            • 9 Posts
            That’s what I initially thought too, but I’ve looked, checked source, it seems fine. If this helps any, here’s a link to the page in question: http://fruchtman.com/test/brinkers/index.php?id=29

            Maybe I’m just blowing by something simple.
              • 26503
              • 620 Posts
              jquery is not being loaded [did you upload the script? smiley ] the link in your source leads to a 404

              -sean
                *** Not just websites, we also create signage, banners, print, trade show displays and more! ***

                Sean Kimball CLP, CLS.
                Technical Director / Sr. Developer | BigBlock Studios
                ._______________________________________________.
                Bigblock Studios http://www.bigblockstudios.ca Web site design & development.
                27-1300 King Street East. Box 167 Oshawa, Ontario L1H8J4 Canada.
                phone/fax: 905-426-5525
                • 35120
                • 9 Posts
                That jquery file doesn’t have anything to do with lightbox. Regardless I linked it up where it should be, but it didn’t make any difference. This is really frustrating, I don’t know what could possibly be stopping it from loading properly.
                  • 4172
                  • 5,888 Posts
                  first I would remove all other js-stuff, what isn’t needed for your lightbox for debugging (nivo-slider and that)

                  then you’ve loaded jquery and nivo-slider two times on this page.
                  I think there is also something wrong with your links - seems you have a link arround all other images.
                    -------------------------------

                    you can buy me a beer, if you like MIGX

                    http://webcmsolutions.de/migx.html

                    Thanks!
                    • 33968
                    • 863 Posts
                    As Bruno suggested, remove all the extra stuff and make sure the lightbox works by itself, before re-adding the other scripts one by one. It could just be a conflict with one of your other scripts.

                    Also - I’m not sure exactly how your lightbox script works but from a quick look through it seems to apply to links with the rel="lightbox" attribute. Your links have rel="lightbox[product]" - does changing that make any difference?

                    Lastly, It’s your decision but I think it’s a bad idea to load two different javascript frameworks - jQuery and prototype. Why not just stick with one, save your visitors from having to download two libraries, and eliminate any potential code conflicts? There are loads of jQuery lightbox plugins...