We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26555
    • 38 Posts
    I have successfully installed Gallery and backendwise everything works perfectly.
    I have created several galleries containing pictures, but I cannot get the frontend to work for some reason.

    I copied the code snippet from the wiki for frontend ouput:
    <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]]


    But no galleries or albums are displayed.
    The chrome dev tools console as well as the apache error logs do not show any error.

    Any help pointing me in the right direction greatly appreciated!

    My configuration:
    Modx Revolution 2.0.3pl, Gallery 1.0.1 rc2, PHP 5.3.2
      • 26555
      • 38 Posts
      Turned out that the default value for "prominentOnly" is true, I set it explicitly to false like so:

      [[!GalleryAlbums? &toPlaceholder=`galleries` &prominentOnly=`0`]]


      Now it’s working!
      But I think setting it by default to true might lead to some confusion.
        • 28215
        • 4,149 Posts
        Well, sort of. I view it differently - that’s the whole purpose of "Prominent" Galleries - you don’t necessarily want *every* gallery you make to be public and listable.
          shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
          • 26555
          • 38 Posts
          Of course you are right as well. Maybe the wording was just a bit confusing for me. Is it mentioned in the docs that by default only prominent galleries are dispayed?
          Well, it definitely makes sense to have more than one flag for filtering output and it’s crystal clear now.

          Good work btw. smiley