We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25154
    • 43 Posts
    Hi guys, I installed Gallery and would love to use Lightbox with it. I downloaded Lightbox, made sure the js and css files were where they should be and found the couple places where I needed to ad the rel tag. the gallery works, but Lightbox doesn’t.

    Anyone had any luck with this or have any info on a better gallery I can use?
      • 28208
      • 1 Posts
      Try using the Galleriffic plugin in Gallery, im using it myself and its a pretty sweet setup!
        • 26621
        • 9 Posts
        Yeah, but so far I haven’t found an option in Galleriffic creating a modal window of some kind (Lightbox, Thickbox, FancyBox,...) either sad
          • 25154
          • 43 Posts
          Ya, that’s the problem I’m running into. It seems something in MODX’s PHP is filtering out the rel="lightbox" at runtime so lightbox can’t do it’s thing.

          Anyone have a workaround for this? I’m sure it’s out there! smiley
            • 25154
            • 43 Posts
            Should I maybe assume that in using Revo I’m using a version that isn’t quite there yet? I see allot galleries and plug-ins for Evo that seem to do what I want, but I really like the elegance of Revo.
              • 20308
              • 31 Posts
              Hi,
              I’m using colorbox with the Gallery component, and it works fine.
              My code in the <head> section:
              <!-- colorbox -->
                <link type="text/css" media="screen" rel="stylesheet" href="[[++site_url]]assets/css/colorbox/colorbox.css" />
                <script src="[[++site_url]]assets/js/jquery.min.js"></script>
                <script src="[[++site_url]]assets/js/jquery.colorbox.js"></script>
                <script> 
                    $(document).ready(function(){
                      //Examples of how to assign the ColorBox event to elements
                      $("a[rel='galerie']").colorbox();
                      });
                  </script>
              <!-- end colorbox -->
              


              My ’thumbTpl’ specific chunk (named GalColorBoxItem):
              <div class="[[+cls]]">
                <a href="[[+image]]" rel="galerie" title="[[+name]]">
                      <img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
                  </a>
              </div>​
              


              and my Gallery snippet calls within the ressource:
              [[!Gallery? &thumbWidth=`120` &thumbTpl=`GalColorBoxItem` &toPlaceholder=`gallery`]]
              [[!GalleryItem]]
              [[!GalleryAlbums? &toPlaceholder=`galleries`]]
              
              <h3>Albums:</h3>
              <ul>
              [[+galleries]]
              </ul>
              <hr />
              [[!+gallery:notempty=`
              <h3>[[+gallery.name]]</h3>
              <p>[[+gallery.description]]</p>
              [[+gallery]]
              `]]
              
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Basically all you need to do is choose the javascript gallery you want to use, get it working with demo content, then set up your Gallery tpl chunks to produce the structure the javascript requires. Gallery lets you manage your images, while the javascript lets you manipulate the output.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 25154
                  • 43 Posts
                  wildcat, thanks for showing me colorbox. I did what you said to do. I still can’t get it working. Was there any special tricks you needed to do to get this to work?

                  The gallery works, just as it did before only no modal window. JPG opens in a new page like before.
                    • 20308
                    • 31 Posts
                    Hi,
                    No special tricks, it just works as I mentionned. Can you give an URL so that I can check the html code?
                      • 25154
                      • 43 Posts
                      Sure, thanks. <website removed>