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

    can anybody tell me how to add a class to the thumbnail-image?

    Cheers, Alex
      • 7923
      • 4,213 Posts
      Create a custom &galleryPictureTpl in chunk and add your class in it. See MaxiGallery wiki page for the parameter and from there you can find the path to the default template.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 1924
        • 119 Posts
        Thanks a lot. The last time if been in this template i didn´t see the line for the image tag. Now, it´s solved. smiley

        Peace Alex
          • 15451
          • 87 Posts
          kathleenread Reply #4, 18 years ago
          i have a question that is a bit related to the post above. i’m trying to get my thumbnails to line up neatly in a row, like you see at http://www.netguru.fi/modx/maxigallery-lightbox2.html . i can see that they’ve stylied their images to end up with <td align="center" style="width:33%"> only i need just a bit more help to fill in my gaps of how to do that.

          i’m getting a bit confused as from the look of it i can edit the default css file, at assets/snippets/maxigallery/ css/default.css, and tweak the ul.thumbs li style to make some changes, only it’s not helping me create rows...

          i have read the wiki and post above, so would i need to tweak &galleryPictureTpl as well? if so, why would you copy it into a new chunk rather than edit the existing/default file [is it purely for ease of use to save editing locally and uploading each time?]. as a start, i have copied and pasted the info from the default file into a new chunk, called it ’galleryPicture’ and have called it using &galleryPictureTpl=`galleryPicture` .

          and now i grind to a halt. would appreciate any help you may offer [as clear as possible would be awesome, simple things that you might think are pretty basic have the ability to trip me up... wink ] thanks thanks.
            • 15451
            • 87 Posts
            kathleenread Reply #5, 18 years ago
            forgot to give a link to my testing place, is http://cheerytomato.com/modx170808/gallery.html grin
              • 16278
              • 928 Posts
              A simple way to put your thumbnails into rows without fiddling with styles is to add the relevant parameter to the MaxiGallery call, e.g. &pics_per_row=`3`. smiley
              Outcome of that is to wrap the thumbnails for each row in <ul> tags.

              You can change the HTML code that is generated for the gallery by adapting the three tpl files that are used by the gallery: galleryoutertpl.html, gallerypicturetpl.html and clearertpl.html.
                • 15451
                • 87 Posts
                kathleenread Reply #7, 18 years ago
                hey there keith,
                thanks so much for taking the time to help me out. i’ve gone with what you said and just used &pics_per_row=`3`. the images don’t line up maybe as i’d like if there are different format ones in the same row, like portrait and landscape, so i had thought styling might do the trick, only i think it might be a bit beyond my skills at the moment. so best workaround is to only have the same format images in a row i reckon. fingers crossed in a month or 2 i’ll get better at understanding all the info in the tpl.html files... laugh
                  • 7923
                  • 4,213 Posts
                  The snippet that is running in the demo site is very old and it uses table layout, that’s why it’s a littlebit different.

                  But yes, like Keith said, with the current version you should use that &pics_per_row parameter and it will break each line in a separate <ul> list. You can use further css tuning to fix the layout when you have different sizes of pictures, try setting this to your css for example:

                  img {vertical-align:middle}


                    "He can have a lollipop any time he wants to. That's what it means to be a programmer."
                    • 15451
                    • 87 Posts
                    kathleenread Reply #9, 18 years ago
                    thanks a lot doze! will give it a crack grin