On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • 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
    • Don't wanna be 'that guy' but anyone any thoughts on this please?
      • 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!
        • 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?
          • And I get '47' for gallery.total
            • 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!
              • 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?
                • Bit of a red herring my last post. Tried using an older version of Gallery and still nothing.
                  • Oh, and no other getPage calls on that page at all. Still stumped sad