-
- 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.
-
- 21 Posts
Oh, meant to mention, I have also tried [[+imgFile]] in the getImages_Tpl in place of [[+imgLink]]
-
- 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,
-
- 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.
-
- 21 Posts
Thanks for the update jerry, I'll give it a go on the site I'm working on at the moment.
-
- 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:
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'
-
- 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>
-
- 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.