Sorry I forgot to post back here reporting what was wrong for me haha.Thanks for letting me know. BTW you need not add the
So my call was missing the page TPL and I suppose not generating my image TPL without it being called.
[[!getImages?
&getImages_Folder=`assets/images/facility`
&getImages_Image_Tpl=`facilityGalleryTPL`
&getImages_Page_Tpl=`example_getImages_Page_Tpl`
]]
Thanks,
JD
[[!getPage? &elementClass=`modSnippet` &element=`getImages` &getImages_Folder=`assets/themes/[[++site_template]]/galleries/[[*Blox.Main.Full.Gallery.Default.ID]]` &getImages_Ext =`jpeg,jpg,gif,png,JPEG,JPG,GIF,PNG` &getImages_Image_Tpl =`getImages_Image` &getImages_Page_Tpl =`getImages_Page` &getImages_Class =`imgThumbItem` &getImages_PageClass =`imgThumbList` &getImages_Id =`imgId` &getImages_PageId =`div` &getImages_Paging =`1` &getImages_Sort=`[[*Blox.Main.Full.Gallery.Default.Sorting]]` &limit=`[[*Blox.Main.Full.Gallery.Default.ThumbsPerPage]]` &pageLimit=`10` ]] [[!getPage? &elementClass=`modSnippet` &element=`getImages` &getImages_Folder=`assets/themes/[[++site_template]]/galleries/[[*Blox.Main.Full.Gallery.Default.ID]]` &getImages_Ext =`jpeg,jpg,gif,png,JPEG,JPG,GIF,PNG` &getImages_Image_Tpl =`getImages_Image_Hidden` &getImages_Page_Tpl =`getImages_Page_Hidden` &getImages_PageClass =`imgThumbListHidden` &getImages_PageId =`div` &getImages_Paging =`1` &getImages_Sort=`[[*Blox.Main.Full.Gallery.Default.Sorting]]` &initialOffset=`[[*Blox.Main.Full.Gallery.Default.ThumbsPerPage]]` &limit=`120` ]]
I'm creating a gallery with paging (which works fine), the user can click the images and they open in a lightbox (swipebox) but as a page only shows the images thats being parsed through the snippet the lightbox also stops with the latest image on the page. So I made another call for all the image links so the loading of the rest of the images (on following pages, with an offset like https://forums.modx.com/thread/72386/getpage-cannot-get-offset-and-total-to-work#dis-post-432900) also can be viewed, but after a page or 2 the remaining images aren't being loaded anymore.
It seems like it only loads the total amount (lets say 120), and then some remaining 30 and on page 3 there aren't any 'hidden' images anymore. It seems it got to do with the paging which counts down by every page, how to make sure that one every page all the remaining images (minus the offset) will be loaded? Can getPage being called two times as it seems they conflict with eachother (?). The paging snippet is only added in the first call ('getImages_Page').
[[!getPage? &elementClass=`modSnippet` &element=`getImages` &getImages_Folder=`assets/themes/[[++site_template]]/galleries/[[*Blox.Main.Full.Gallery.Default.ID]]` &getImages_Ext =`jpeg,jpg,gif,png,JPEG,JPG,GIF,PNG` &getImages_Image_Tpl =`getImages_Image` &getImages_Page_Tpl =`getImages_Page` &getImages_Class =`imgThumbItem` &getImages_PageClass =`imgThumbList` &getImages_Id =`imgId` &getImages_PageId =`div` &getImages_Paging =`1` &getImages_Sort=`[[*Blox.Main.Full.Gallery.Default.Sorting]]` &limit=`[[*Blox.Main.Full.Gallery.Default.ThumbsPerPage]]` &pageLimit=`10` ]] [[!getPage? &elementClass=`modSnippet` &element=`getImages` &getImages_Folder=`assets/themes/[[++site_template]]/galleries/[[*Blox.Main.Full.Gallery.Default.ID]]` &getImages_Ext =`jpeg,jpg,gif,png,JPEG,JPG,GIF,PNG` &getImages_Image_Tpl =`getImages_Image_Hidden` &getImages_Page_Tpl =`getImages_Page_Hidden` &getImages_PageClass =`imgThumbListHidden` &getImages_PageId =`div` &getImages_Paging =`1` &getImages_Sort=`[[*Blox.Main.Full.Gallery.Default.Sorting]]` &initialOffset=`[[*Blox.Main.Full.Gallery.Default.ThumbsPerPage]]` &limit=`120` ]]
Thanks in advance!
I'm not sure that I fully understand what you are doing but I'll take a stab at it. In the second call you want all the images, right? If so then why use getPage at all? Just use getImages
like:
[[!getImages?
getImages_Folder=`assets/themes/[[++site_template]]/galleries/[[*Blox.Main.Full.Gallery.Default.ID]]`
&getImages_Ext =`jpeg,jpg,gif,png,JPEG,JPG,GIF,PNG`
&getImages_Image_Tpl =`getImages_Image_Hidden`
]]
but correct me if I'm wrong.
Hello, does anyone know if there is a way to sort getImages by filename or menuindex? It seems to be making it's own order hehe
Thanks Jerry - you da bomb!Not sure about that. I just made something I wanted and then thought, why not see if anyone else was interested. Some were and even had some great ideas how to make it better. The Modx community is da bomb!