Hi, I tried to create an image gallery with pagination based on this tutorial:
http://rtfm.modx.com/extras/revo/migx/migx.tutorials/migx.use-resource-specific-mediasource-and-multifile-uploader
And everything works fine so far. But only one thing drives me crazy. Inside the template where I used to show the items, I would also like to add the number of the item in the title - e.g. title="Foto #[[+idx]]".
I guessed the placeholder [[+idx]] would do the job and it does. But since I have a &limit parameter set and use the pagination, the idx seems to be reset to 1 on every page from pagination.
Is there something trivial that I'm missing or missunderstood - please have a look to my code below.
<div>
[[!getPage?
&element=`getImageList`
&tpl=`GalleryTmpl`
&limit=`24`
&tvname=`resourcealbum`
&pageVarKey=`page`
&pageNavVar=`page.nav`
&totalVar=`total`
]]
</div>
<div class="text-center">
<ul class="pagination">[[!+page.nav]]</ul>
</div>
GalleryTemplate
[[+image:notempty=`
<div class="col-xs-4 col-sm-3 col-md-2 col-lg-2">
<a class="thumbnail" href="[[+image]]" title="Foto #[[+idx]] [[+title]]" data-gallery="">
<img id="[[+idx]]_gallery_image" src="[[+image:phpthumbof=`w=120&h=100`]]" />
</a>
</div>`]]
Thank you in advance and best regards!
Alex