We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49298
    • 1 Posts
    Revo 2.3.2
    Gallery 1.7.0-pl

    What should I put in the &album=` ` in order to show the latest album by default.

    [[!Gallery? &album=`1` &toPlaceholder=`gallery` &plugin=`slimbox` &slimboxUseCss=`1` &slimboxRenderJsOnStartup=`1` &thumbWidth=`112` &thumbHeight=`112` &imageWidth=`829` &imageHeight=`829`]]

    There is only one album at the moment so &album=`1` seems fine. But when my client adds a new album they will expect it to be shown, not the older album.
      • 44234
      • 219 Posts
      You need to grab the latest albums ID so using the 'GalleryAlbums' snippet should do the trick:
      [[!Gallery?
      &album=`[[!GalleryAlbums? &sort=`createdon` &limit=`1` &rowTpl=`galTplId`]]`
      &toPlaceholder=`gallery`
      &plugin=`slimbox`
      &slimboxUseCss=`1`
      &slimboxRenderJsOnStartup=`1`
      &thumbWidth=`112`
      &thumbHeight=`112`
      &imageWidth=`829`
      &imageHeight=`829`]]
      

      galTplId chunk:
      [[+id]]
      

      There are better ways of doing this but depends how your Gallery is displayed in the front end.
        Find me on Twitter, GitHub or Google+