We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43851
    • 21 Posts
    WhatI am trying is really simple but I'm missing something! I just want to populate an image carousel with images from the directory: images/clients.
    This is the snippert I'm using:

    [[!getImages?
    &getImages_Folder=`images/clients`
    &getImages_Ext =`*.jpg,*.png`
    &getImages_Tpl =`getImages_Tpl`
    ]]

    And this is the getImages_Tpl chunk:

    <div class="item">
    <div class="col-xs-12 col-sm-4 col-md-2 range_slides_item_image">
    <div class="item-inner"><div class="img-container"><a href="[[+imgLink]]"><img alt="client" src="images/clients/[[+imgLink]]"></a></div></div>
    </div>
    </div>

    I have made no changes to the getFolders and getImages snippets.
      • 43851
      • 21 Posts
      Oh, meant to mention, I have also tried [[+imgFile]] in the getImages_Tpl in place of [[+imgLink]]
        • 14020
        • 75 Posts
        Quote from: webo880 at Dec 11, 2015, 10:51 AM
        WhatI am trying is really simple but I'm missing something! I just want to populate an image carousel with images from the directory: images/clients.
        This is the snippert I'm using:

        [[!getImages?
        &getImages_Folder=`images/clients`
        &getImages_Ext =`*.jpg,*.png`
        &getImages_Tpl =`getImages_Tpl`
        ]]

        And this is the getImages_Tpl chunk:

        <div class="item">
        <div class="col-xs-12 col-sm-4 col-md-2 range_slides_item_image">
        <div class="item-inner"><div class="img-container"><a href="[[+imgLink]]"><img alt="client" src="images/clients/[[+imgLink]]"></a></div></div>
        </div>
        </div>

        I have made no changes to the getFolders and getImages snippets.

        So Sorry I took so long to get back to you. There is something wrong with the notification on this board. I hope you were able to figure out the problem. From what I see there is an issue with the
        &getImages_Ext =`*.jpg,*.png` line.
        It should read &getImages_Ext =`jpg,png`
        I have a getImages_Tpl chunk that I use for testing that just shows what each variable contains that helps me out. Maybe I should put it in the docs.
          • 17301
          • 932 Posts
          Does this extra still work with the latest version of MODX? I've tried everything in the documentation and in the comments here but I can't seem to get it output anything.

          Thanks,
            ■ email: [email protected] | ■ website: https://alienbuild.uk

            The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
            • 14020
            • 75 Posts
            Quote from: lkfranklin at Oct 18, 2016, 09:31 AM
            Does this extra still work with the latest version of MODX? I've tried everything in the documentation and in the comments here but I can't seem to get it output anything.

            Thanks,

            Yes. I Use it every day. with the latest version ox MODX. Tell me more about you set-up and maybe I can help.
              • 14020
              • 75 Posts
              Just released 2.4.0 Just a few minor changes:
              - Added a tag to get the path without the root folder.
              - Changed some installed example chunks to show usage with pThumbs by jgrant.
              - packaged pThumb with the package for convenience.
              - Redid all documentation.
              - made sure all parts work as described.
                • 43851
                • 21 Posts
                Thanks for the update jerry, I'll give it a go on the site I'm working on at the moment.
                  • 17301
                  • 932 Posts
                  Thanks Jerry,

                  I've just done an update to grab your updated version and I'm just simply using this call at the moment:

                  [[!getImages]]


                  I have some images placed in assets/photos to test also. I've cleared the system cache but when I go to view the page I get this:

                  'Fatal error: Call to undefined function exif_read_data() in /home/***/public_html/core/cache/includes/elements/modsnippet/158.include.cache.php on line 123'



                    ■ email: [email protected] | ■ website: https://alienbuild.uk

                    The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
                    • 43851
                    • 21 Posts
                    Still had problems with it displaying the images using this:

                    [[!getImages?
                    &getImages_Folder=`images/partners`
                    &getImages_Image_Tpl=`PartnerImagesChunk`
                    &getImages_Ext=`png,PNG,jpg,JPG,gif,GIF,bmp,BMP,tiff,TIFF,jpeg,JPEG`
                    &getImages_Sort=`filename`
                    ]]

                    I found that by adding: &getImages_Page_Tpl=`get-images-page` it worked fine. So that required the two chunks:

                    get-images-page:
                    <div class="owl-carousel clients">
                    [[+photos]]
                    </div> - this is the containing div for this:


                    PartnerImagesChunk:
                    <div class="client"><img src="[[+imgLink]]"></div>
                      • 14020
                      • 75 Posts
                      OK, I just did a clean install of Modx 2.5.1-pl on my test site.
                      I went to extras and downloaded getImages, installed it, and placed a few images in a folder named photos that I created under assets.
                      I right-clicked on the chunk named example_getImages_Image_Tpl, chose duplicate chunk and then I named the new chunk getImages_Image_Tpl by removing the "Duplicate of example_" from the front. I then did the same with the example_getImages_Page_Tpl.
                      At this point I added the getImages call to the home page and removed everything else so that the home page only had [[!getImages]] on it. I then viewed the home page and all my images from the assets/photos folder were visible.
                      It does require 2 chunks to make the snippet work and if they are named getImages_Image_Tpl and getImages_Page_Tpl then the call will work without having to add anything to the snippet call.
                      I did notice that the installation of the snippet was missing the change log, License, and readme sections. Not sure what happened there but I will endeavor to correct that ASAP.
                      Would it be better if I had the 2 chunks created as I describe in the upload package? I did them the way I did so that if you were using them with the default names but had made your own changes they would not be over written if you did an upgrade.
                      I take it from you last post you were able to make it work. If not let me know and I will try and help as best I can.