1

I use MODx Revolution ver.2.20 with Gallery module ver.1.4.0. So, I need to get the number of images in a folder. I googled it, but I didn't find any working solution.

How can I get it? Thanks.

Ok, this is the solution.

Snippet call

[[!GalleryAlbums? &parent=`5` &showAll=`1` &sort=`rank` &dir=`ASC` &limit=`50` &rowTpl=`b-top-img`]]

b-top-img snippet

      <!-- p-cover -->
      <div class="p-cover [[+id]]">
        [[!Gallery? &album=`[[+id]]` &thumbWidth=`300px` &thumbHeight=`300px` &thumbTpl=`b-middle-img`]]
      </div>
      <!-- /p-cover -->   

b-middle-img chunk

      <div class="p"><img src="[[+thumbnail]]" alt="[[+name]]" /></div> 
curveball
  • 4,320
  • 15
  • 39
  • 49
Nixon
  • 83
  • 1
  • 9

1 Answers1

1

If you are familiar with PHP you can create your own snippet from this example — http://rtfm.modx.com/display/ADDON/Gallery.GalleryItem.GalleryItemPagination

amrok
  • 186
  • 10