We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5340
    • 1,624 Posts
    Snippets as well
      • 36461
      • 102 Posts
      I have added snipets to my previous post.
        • 5340
        • 1,624 Posts
        I was reffering about the snippet calls.

        [[Gallery ....]]


        BTW do you have the latest Gallery?
          • 36461
          • 102 Posts
          Sorry I’m still kinda new to modx smiley

          I’m using this call:
          [[!GalleryAlbums? &limit=`0` &albumCoverSort=`rank` &prominentOnly=`0` &rowTpl=`galAlbumRowTpl`]]
            • 5340
            • 1,624 Posts
            If you look at my tutorial you need at least 2 snippet calls to make it work.
            GalleryAlbums and Gallery

            You use one so it won’t work
              • 36461
              • 102 Posts
              which calls are you using in your demo ?

              These
                      [[[GalleryAlbums? &toPlaceholder=`GalleryAlbums` &limit=`0` &albumCoverSort=`rank` &prominentOnly=`0` &rowTpl=`DemoGalAlbumRowTpl` &thumbWidth=`195` &thumbHeight=`140`]]
                        
                      [[[Gallery? &checkForRequestTagVar=`1` &toPlaceholder=`Gallery` &useCss=`0` &containerTpl=`DemoGalleryAlbumTpl` &thumbWidth=`195` &thumbHeight=`140` &thumbTpl=`DemoGalItemThumb` &imageWidth=`800` &imageHeight=`800`]]



                • 5340
                • 1,624 Posts
                Both need to be used. In the official Gallery docs 3 snippets are used.

                [[!Gallery? &toPlaceholder=`gallery`]]
                [[!GalleryItem]]
                [[!GalleryAlbums? &toPlaceholder=`galleries`]]


                Because I use colorbox the 3rd snippet(GalleryItem) ca be omitted.
                  • 36461
                  • 102 Posts
                  I’m sorry, I still don’t get it.

                  I tried using these calls:
                  [[!GalleryAlbums? &limit=`0` &prominentOnly=`0` &rowTpl=`galAlbumRowTpl`]]
                  [[!Gallery? &toPlaceholder=`gallery`]]
                  [[!GalleryItem]]
                  


                  But still nothing

                  I also wanted to clarify one thing.

                  In my template after [[*content]] I’ve put this code:
                  
                          [[[GalleryAlbums? &toPlaceholder=`GalleryAlbums` &limit=`0` &albumCoverSort=`rank` &prominentOnly=`0` &rowTpl=`galAlbumRowTpl` &thumbWidth=`195` &thumbHeight=`140`]]
                            
                          [[[Gallery? &checkForRequestTagVar=`1` &toPlaceholder=`Gallery` &useCss=`0` &containerTpl=`galAlbumTpl` &thumbWidth=`195` &thumbHeight=`140` &thumbTpl=`galItemThumb` &imageWidth=`800` &imageHeight=`800`]]
                          
                          [[[If? &subject=`[[+Gallery]]` &operator=`isempty` &then=`
                              
                              [[+GalleryAlbums]]
                          
                          ` &else=`
                             
                              [[+Gallery]]
                              
                          `]]
                  


                  And then call it with this:

                  [[!GalleryAlbums? &limit=`0` &prominentOnly=`0` &rowTpl=`galAlbumRowTpl`]]
                  [[!Gallery? &toPlaceholder=`gallery`]]
                  [[!GalleryItem]]
                  


                  Is this right or have I misunderstood something ?

                    • 5340
                    • 1,624 Posts
                    Hi wonderland,

                    I suggest you first follow one of the tutorials step by step. Maybe it will make more sense.
                    I think you are just using parts of the tutorial and there are things that are interconected

                    For example

                    [[!Gallery? &toPlaceholder=`gallery`]] won’t work by itself

                    It needs to be

                    [[!Gallery? &toPlaceholder=`gallery`]]
                    [[+gallery]]

                    Good luck
                      • 36461
                      • 102 Posts
                      I actually did everything you described in your tutorial,
                      Only difference was that I changed some chunk names.

                      Problem is that I only understand basic modx functions, I was able to ouput galleries just the way I wan’t in modx Evolution since there was graphic user interface, but in Revolution you must do everything in code.
                      And it’s quite hard for someone who tranfered from wordpress where you just installed plug-in and added pictures smiley

                      I think I’m not very far from correct output, probably some stupid newb mistake smiley

                      I could revert back to modx Evolution, but I think it would be much longer task instead of finding this one small problem.

                      I will try your tutorial once more without chaning any chunk names, templates and so on.

                      P.S

                      For example, in your tutorial you mentioned that I should upload images to components/Gallery in my case gallery folder is with lowercase letter, could this affect anything ?

                      Edit:

                      Ok, I tried just copying everything from your tutorial as is including chunks, chunk names, and template code
                      Used this snipet call:
                      [[!GalleryAlbums? &limit=`0` &prominentOnly=`0` &rowTpl=`galAlbumRowTpl`]]
                      [[!Gallery? &toPlaceholder=`gallery`]]
                      [[+gallery]]
                      


                      Unfortuinately I got exactly the same result. sad

                      I’ve published output page here: http://uspot.eu/test.html