We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 24017
    • 88 Posts
    Hi,I'm trying to achieve something pretty basic but cannot seem to find out how to do it .
    All I need s to show the first 4 images of an album in a row , and when I click on any image the lightbox opens showing all images within the album just like any lightbox would do.
    I got the lightbox set up fine (i'm using colorbox) , but I have pbs tying to understand how to show the first 4 images of each album. Any help will be appreciated !

    This is the code I've got to so far

    <p>[[!Gallery? &thumbWidth=`120` &thumbTpl=`GalColorBoxItem` &toPlaceholder=`gallery` ]] [[!GalleryItem]] [[!GalleryAlbums? &toPlaceholder=`galleries` &rowTpl=`galAlbumRowWithCoverTpl` &thumbWidth=`200` &thumbHeight=`120` &showName='0']]</p>
    <hr />
    <h3>Albums:</h3>
    <ul id="albums">[[+galleries]]</ul>
    <p>[[!+gallery:notempty=`</p>
    <h3>[[+gallery.name]]</h3>
    <p>[[+gallery.description]]</p>
    <p>[[+gallery]] `]]</p>


    You can have a look at the result live here hostelsuites.com/flavsite/gallery-test.html
    Many thanks
      • 3109 ☆ A M B ☆
      • 894 Posts
      Try adding

      &limit=`4`


      as a parameter in your gallery call that might work.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX