We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45379
    • 3 Posts
    Hello everyone,

    first apologize my English. I also want to thank MODx developers for making this CMS.

    I just want to ask, if possible to create Sub Albums (Child Albums) with Gallery component. I hardly tried make Sub Albums using [[GalleryAlbums]] and chunks, unfortunatly I didnt succeed. I can easily make one level gallery with album page, thumb page and lightbox, but not two or more levels, nested albums.

    Secondly - is possible to integrate Gallery tree structure into the Wayfinder genereted menu?

    I have latest MODx configuration:
    MODX Revolution 2.2.14-pl
    gallery-1.6.2-pl
    wayfinder-2.3.3-pl
    phpthumbof-1.4.0-pl



    Martin
      • 45379
      • 3 Posts
      here is my gallery template
      
      [[!Gallery? &toPlaceholder=`gallery` &thumbWidth=`300` &thumbHeight=`300` &imageWidth=`1440` &imageHeight=`900` ]]
      
      
      [[!+gallery:isnot=``:then=`
      
      <h1>[[+gallery.name]]</h1>
      
      <br>	 
      <div class="popup-gallery"> 
      <ul class="small-block-grid-2 medium-block-grid-4 large-block-grid-5"> 
       [[+gallery]]
      </ul>
      </div>
      <br>
      <a href="[[~[[*id]]]]" class="vice-foto hide-for-print">Zpět na přehled</a>
      
      <br>
      `:else=`
      
      <h1>Fotoarchiv</h1>
      <div class="row">
        <div class="small-9 large-12 small-centered large-uncentered columns">
      <ul class="small-block-grid-1 medium-block-grid-2 large-block-grid-4"> 	
      
      [[!GalleryAlbums? &limit=`0` &albumCoverSort=`rank` &sort=`createdon` &dir=`ASC` &rowTpl=`galAlbumRowTpl` &thumbWidth=`400` &thumbHeight=`400` &showAll=`1` &parent=`[[+id]]`]]
      
      </ul>
      </div>
      </div>
      `]]
      
      



      galAlbumRowTpl Chunk
      <li>
      
      <h3>[[+name]]</h3>
      
      <a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]" title="[[+name]]"><img src="[[+image]]" alt="[[+name]]" class="album-img" /></a>
      
      <a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]" class="vice-cinnost hide-for-print">Zobrazit galerii</a>
           
      
      </li>
      



      galItemThumb Chunk
      <li>
          <a href="[[+image]]" title="[[+name]]">
              <img src="[[+thumbnail]]" alt="[[+name]]" [[+image_attributes]] class="thumb-img"/>
          </a>
      </li>