We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7527
    • 437 Posts
    Ok, I have found a better Gallery pagination thread here:

    https://forums.modx.com/thread/?thread=37769&page=2

    I have created a chunk and placed this code in it:

    [[!Gallery? 
    &plugin=`slimbox` 
    &thumbTpl=`galItemThumb` &thumbTplFirst=`galItemThumbFirst`
    &limit=`[[+limit]]`
    &start=`[[+offset]]`
    &album=`Carousel`
    ]]


    I named the chunk gallery_wrapper and then added the following to my html:

     [[!getPage@newspaging?
    &elementClass=`modChunk`
    &element=`gallery_wrapper`
    &limit=`5`
    &totalVar=`gallery.total`
    ]]
    
     <nav class="pagination">
      <ul>
        <li class="pages"><strong>Page [[+page]] of [[+pageCount]]</strong></li>
        [[!+page.nav]]
      </ul>
    </nav>


    This shows 5 pictures and a 'page 1 of 1'. This album has over 20 images, so a link to extra pages should be showing (the [[!page.nav]] part) but it does not appear to be working. Any ideas please?

    This question has been answered by distant_smile. See the first response.

    [ed. note: distant_smile last edited this post 10 years, 6 months ago.]
      www.PawsForWildlife.co.uk
      www.Borntobrick.co.uk
    • discuss.answer
      • 7527
      • 437 Posts
      Fixed it...

      [[!getPage@newspaging?
      &element=`Gallery`
      &plugin=`slimbox` 
      &thumbTpl=`galItemThumb`
      &limit=`[[+limit]]`
      &start=`[[+offset]]`
      &album=`Carousel`
      &limit=`24`
      &totalVar=`gallery.total`
      &pageNavVar=`page.nav`
      ]]
        www.PawsForWildlife.co.uk
        www.Borntobrick.co.uk