We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36671 ☆ A M B ☆
    • 120 Posts
    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.
      • 42712
      • 4 Posts
      Hi inTandem!!...I think the point is in getPage because is very important make sure that getPage knows how much results (or images) you're trying to paging...have you read this? https://forums.modx.com/thread/47809/use-simplesearch-together-with-getpage-in-revo#dis-post-453600 ....I made a couple of changes to get getPage working with other plugin....

      I hope it help you smiley
        • 36671 ☆ A M B ☆
        • 120 Posts
        Quote from: ijmorgado at Feb 04, 2013, 01:38 AM
        is very important make sure that getPage knows how much results (or images) you're trying to paging...

        Hi ljmorgado

        I think the &limit=`12` is taking care of that in my scenario above. However, Mark Hamstra sent me a link to the following fix here: https://github.com/splittingred/Gallery/pull/248

          • 42712
          • 4 Posts
          Quote from: intandem at Feb 04, 2013, 05:44 AM
          Quote from: ijmorgado at Feb 04, 2013, 01:38 AM
          is very important make sure that getPage knows how much results (or images) you're trying to paging...

          Hi ljmorgado

          I think the &limit=`12` is taking care of that in my scenario above. However, Mark Hamstra sent me a link to the following fix here: https://github.com/splittingred/Gallery/pull/248


          That's good ...I didn't know that...so...I think you've solved your problem at this time.... smiley