MoreGallery + Pagination (getPage)

Hi there,

I am having trouble with the snippet call using getPage for pagination in combination with MoreGallery.

My current snippet call is:

[[!getPage? &element=`mgGetImages` &tpl=`gallery.tpl` &limit=`50`]]

and my gallery.tpl looks like:

<a href="[[+file_url:phpthumbof=`w=1000&q=95&fltr[]=wmi|images/watermark.png`]]" data-lightbox="skiing_gallery" data-title="[[+name]]" class="images">
    <div class="image">
        <img src="[[+file_path:phpthumbof=`w=200&h=150&zc=1&q=100`]]" alt="[[+name]]">

The output from the above seems to not use the template I have assigned, as none of the images come through with the css, or pthumb. I have tested this with just using a regular MoreGallery call:

[[mgGetImages? &limit=`0` &sortBy=`uploadedon` &sortDir=`ASC` &imageTpl=`gallery.tpl`]]

and it gets called perfectly fine with the css/pthumb through that.

So for some reason it seems as though my getPage call is not going through the gallery.tpl I have specified. Are there any steps I have missed that could have caused this?

Thanks all for your future help :slight_smile:

Hi @kksailskivt!

In your getPage call you are using &tpl instead of &imageTpl, that’s probably why :slight_smile:

I did edit your post to make the formatting a bit clearer… for best results use three ` marks on a single line before and after blocks of code, that’ll turn it into a nice code block.

1 Like

Thank you very much @mhamstra

For those wondering, here is my final snippet call for getPage pagination with MoreGallery integration:
[[!getPage? &element=`mgGetImages` &imageTpl=`gallery.tpl` &limit=`50`]] [[!+page.nav]]

1 Like