I have a straight forward gallery of thumbnail images which are being generated with the Gallery component (site is Revo 2.2.5). I want to show 12 thumbnails per page. On initial page load, the first 12 thumbnails show and pagination is created when I have more than that. But when I click on "Next" or "2", I get redirected to the homepage.
This is my code:
<div id="contentCol2" class="col2">
[[!getPage?
&elementClass=`modSnippet`
&element=`Gallery`
&totalVar=`gallery.total`
&limit=`12`
&album=`[[*album-number]]`
&thumbTpl=`IPW_galleryThumbTpl`
&albumRowTpl=`IPW_galAlbumRowTpl`
&thumbWidth=`130`
&thumbHeight=`130`
&pageVarKey=`page`
&start=`page`
]]
<br class="clrflt" />
<div class="pageNav">[[!+page.nav]]</div>
<script>
jQuery('a.gallery').colorbox({ rel:'colorbox' });
</script>
</div> <!--end contentCol2 -->
The link created by the pagination code is
http://www.myclient.com/portfolio-of-residential-projects.html?page=2
The same happens also when I click on the page 1 link directly, with the link URL being
http://www.myclient.com/portfolio-of-residential-projects.html?page=1
I only get to see the initial gallery when I go to the
http://www.myclient.com/portfolio-of-residential-projects.html page itself (which is where the above code is sitting).
So in both cases MODX doesn't understand the link and brings me to the home page. Any idea what I'm doing wrong?
Thanks for all help.