We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25315
    • 68 Posts
    I am experimenting with the gallery addon documented here:
    http://rtfm.modx.com/display/ADDON/Gallery

    I’m using modx-2.1.2-pl and gallery version 1.2.1

    After installing the addon, I can access and edit the settings that appear in the ’components’ menu.
    I have no problem editing and saving a gallery.

    I’ve created a gallery and marked it ’active’ and ’prominent’.

    I’ve followed the directions here:
    http://rtfm.modx.com/display/ADDON/Gallery.Setting+Up+Your+Gallery

    So, I now have a gallery with the id ’1’.

    This is the code for my resource. Most of it is simply copied from the documentation from the set up guide.

    <h1>In Frontpage</h1>
    <p> </p>
    <p>Here, we will test a gallery.</p>
    
    <div style="float: right">
    <h2>Galleries</h2>
    <ul>
    [[!GalleryAlbums]]
    </ul>
    </div>
     
    <h2>Item</h2>
     
    [[!GalleryItem]]
    [[!+galitem.image:notempty=`
    <div class="image">
      <a href="[[+galitem.image]]"><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /></a>
      <br />Albums: [[+galitem.albums]]
      <br />Tags: [[+galitem.tags]]
    </div>
    `]]
    


    After clearing the cache and reloading the site, I can’t see anything.
    Looking at the sites source code, I can see that the code above is being output into the resource. However, no images are being shown.

    What have I missed?
      • 3109 ☆ A M B ☆
      • 894 Posts
      You’re missing the displaying selected album code.

      [[!Gallery? &album=`1` &toPlaceholder=`gallery`]]
      <h1><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]">[[+gallery.name]]</a></h1>
      <p>[[+gallery.description]]</p>
       
      [[+gallery]]
      
      
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 25315
        • 68 Posts
        I’m still not seeing anything.

        The complete resource content now looks like this:

        <h1>In Frontpage</h1>
        <p> </p>
        <p>Here, we will test a gallery.</p>
        
        
         <div style="float: right">
        <h2>Galleries</h2>
        <ul>
        [[!GalleryAlbums]]
        </ul>
        </div>
         
        <h2>Item</h2>
         
        [[!GalleryItem]]
        [[!+galitem.image:notempty=`
        <div class="image">
          <a href="[[+galitem.image]]"><img class="[[+galitem.imgCls]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /></a>
          <br />Albums: [[+galitem.albums]]
          <br />Tags: [[+galitem.tags]]
        </div>
        `]]
         
        <hr />
         
        [[!Gallery? &album=`1` &toPlaceholder=`gallery`]]
        <h1><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]">[[+gallery.name]]</a></h1>
        <p>[[+gallery.description]]</p>
         
        [[+gallery]]
        
        
        
          • 3109 ☆ A M B ☆
          • 894 Posts
          Try your gallery call uncached.

          [[Gallery? &album=`1` &toPlaceholder=`gallery`]]
          <h1><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]">[[+gallery.name]]</a></h1>
          <p>[[+gallery.description]]</p>
           
          [[+gallery]]
          
          


          I had an issue with NivoGallery not displaying when the gallery is uncached.

          Let me know if it works.
            Benjamin Marte
            Interactive Media Developer
            Follow Me on Twitter | Visit my site | Learn MODX
            • 25315
            • 68 Posts
            I got it working.

            I actually completely reinstalled modx from scratch, and followed the setup process in the documentation for gallery again.

            This install is just a lab setup, so I can get away with blowing everything away.

            I’m aware that this doesn’t help me figure out what I did wrong. But at least I can start playing with the addon now.

            I used the unmodified code from the documentation, so I’m allowing caching.