We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37746
    • 42 Posts
    Hi all

    I know there are a few posts concerning getting pagination on a gallery album but I cannot, for the life of me, get it working on one site. I just have one simple gallery for a page and I want it paginated. I have this working on a website based on Revo 2.2.16 using Gallery 1.6.2 and getPage 1.2.4 and with the following code;

    <ul id="gallery">
    [[!getPage? &elementClass=`modChunk` &element=`gallery-wrapper` &limit=`16` &totalVar=`gallery.total`]]
    </ul>
    <div class="clear"></div>
    <ul id="pagination">
    [[!+page.nav]]
    </ul><!--\#pagination -->


    and

    [[!Gallery? &album=`show2014` &limit=`[[+limit]]` &thumbWidth=`221` &thumbHeight=`144` &thumbTpl=`innerGal` &start=`[[+offset]]`]]


    In the website it doesn't work, using Revo 2.3.3, Gallery 1.7.0 and getPage 1.2.4 and with the following code;

    <ul class="popup-gallery">
    [[!getPage? &elementClass=`modChunk` &element=`galleryWrapper` &limit=`15` &totalVar=`gallery.total`]]
    	</ul>
    <div class="pageNav">[[!+page.nav]]</div>
    	</div>


    and

    [[!Gallery? &album=`[[*gallerySelect]]` &limit=`[[+limit]]` &thumbWidth=`221` &thumbHeight=`144` &thumbTpl=`galleryBlockTpl` &start=`[[+offset]]`]]


    gallerySelect is just a template variable and the gallery show, just no output in the pageNav placeholder. Please has anyone got a clue what might be wrong? Has something changed in Gallery 1.7.0 that is messing this up?

    Any help much appreciated, thanks smiley
      • 37746
      • 42 Posts
      Don't wanna be 'that guy' but anyone any thoughts on this please?
        • 4172
        • 5,888 Posts
        do you get the correct values for

        [[+limit]] and [[+offset]] and [[+gallery.total]] ?

        and does it work, when you set the values for limit and offset directly?




          -------------------------------

          you can buy me a beer, if you like MIGX

          http://webcmsolutions.de/migx.html

          Thanks!
          • 37746
          • 42 Posts
          Thanks Bruno17, I get the values of '15' for limit and '0' for offset. Does that sound right to you? If not, what do you reckon they should be?
            • 37746
            • 42 Posts
            And I get '47' for gallery.total
              • 4172
              • 5,888 Posts
              This does sound right for me, so far, for the first page and should create a pagination at

              [[!+page.nav]]


              do you probably have another getPage - call at the same page?
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!
                • 37746
                • 42 Posts
                Yep, I've got the

                [[!+page.nav]]


                Like so

                <div class="pageNav">[[!+page.nav]]</div>
                    </div>


                All very strange and quite frustrating! I actually upgraded another customer's site to Gallery 1.7.0 a few weeks back and then had to roll it back to an earlier version because of this same problem. Could it be a bug in Gallery itself do you think?
                  • 37746
                  • 42 Posts
                  Bit of a red herring my last post. Tried using an older version of Gallery and still nothing.
                    • 37746
                    • 42 Posts
                    Oh, and no other getPage calls on that page at all. Still stumped sad