On March 26, 2019 we launched new MODX Forums. Please join us at the new MODX Community Forums.
Subscribe: RSS
  • Hi
    I have a page with a list of albums, but I will like to show a thumbnail next to each album title. How can I grab one of the album images an put it there?

    • Just in case someone is interested, I figured it out.

      In the template for the album name, called by default ’galAlbumRowTpl’ I added the following code

      <div class="album">

      <div class="thumb">
      [[#the following line show a thumbnail for the album, ~3 is the id of the page that shows the album]]
      <a href="[[~3? &[[+albumRequestVar]]=`[[+id]]`]]">
      [[!Gallery? &album=`[[+name]]` &limit=`1` &thumbTpl=`galAlbumThumb` &thumbWidth=`200` ]]

      <div class="link">
      [[#this line shows the album name and links to it]]
      <a href="[[~3? &[[+albumRequestVar]]=`[[+id]]`]]">[[+name]]</a>