We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 46169
    • 7 Posts
    Hello

    I have some problem.

    How can i add gallery album to article when i'm writinig them? (or some integrations with another gallery plugin?)
    I'd like add new field to artcle writing form where i put image that will show on te front page.

    How can i do this?

    Thanks, and i'm sorry for my english smiley
      • 30912
      • 463 Posts
      Hello smiley

      This might help, its a slightly different situation but you can assign a Template Variable to the Articles Template, however its not always visible until after the initial article is saved (so you might need to edit it again to get the gallery to show)

      https://forums.modx.com/thread/88407/tv-input-options-filled-with-all-available-galleries#dis-post-486406

      Dont forget you will need to have the gallery display code in the template

      Hope that helps
        • 46169
        • 7 Posts
        Thanks, its work

        but i have next problem. I loading slimbox and image is too big. It is possible to automaticly resizing image to the window size?
          • 30912
          • 463 Posts
          Sure, use pThumb (an offshoot of phpthumb but faster) in your template call for the gallery you might need to use something like;

          [[+image_absolute:phpthumbof=`w=800&h=600`]]


          without seeing your galleryTpl, i couldnt really advise further smiley

          for example we use a lightweight js popup with this template

           <li class="gal-media-item">
             <a href="[[+image_absolute]]" >
              <img src="[[+image_absolute:phpthumbof=`w=300&h=200&zc=1`]]" alt="[[+name]]" />
               
              </a></li> 
          
            • 46169
            • 7 Posts
            I have this in my article template

            [[Gallery? &album=`[[*Wybierz Album]]` &plugin=`slimbox` &loop=`1` &slimboxLoadJQuery=`1`]]


            So where i should put your code?
              • 30912
              • 463 Posts
              ah, im looking at the manual on RTFM.

              http://rtfm.modx.com/extras/revo/gallery/gallery.plugins/gallery.plugins.slimbox

              It looks like you will need to change the source images rather than integrating it directly as it doesnt look like that is templateable without going into the core (i dont use slimbox)

              easy way is to resize the images as mentioned above, unless you fancy poring over the cofig files added when Gallery was installed.

              Sorry smiley
                • 3109 ☆ A M B ☆
                • 894 Posts
                Without looking at your gallery you have 2 options either use thumbWidth and thumbHeight parameters for gallery or specify a thumbTpl chunk and do the markup as Tyreal2012 suggested.

                You can find more info on both of these in the RTFM section for Gallery and thumbTpl

                Good Luck.
                  Benjamin Marte
                  Interactive Media Developer
                  Follow Me on Twitter | Visit my site | Learn MODX
                  • 46169
                  • 7 Posts
                  Look: http://projektspark.pl/modx/index.php?id=15
                  When you click on the cross image will zoom and it is too big thumb is ok....
                    • 30912
                    • 463 Posts
                    try this:

                    [[Gallery? &album=`[[*Wybierz Album]]` &plugin=`slimbox` &loop=`1` &slimboxLoadJQuery=`1` &imageWidth=`700` &imageHeight=`700`]]


                    make sure that you clear your cache after adding it, you might also need to re-add the image to the gallery but that should limit it to 700x700pixels.
                      • 46169
                      • 7 Posts
                      Don't work