We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34472
    • 1 Posts
    Hi,
    I have a problem with showing subalbums in Gallery.
    I have created chunk parentAlbumRow which looks like:
    <li[[+cls:notempty=` class="[[+cls]]"`]]><a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]">[[+showName:notempty=`[[+name]]`]]</a>
      <ul>
      [[!GalleryAlbums? &parent=`[[+id]]` &showAll=`0` &albumCoverSort=`random` &rowTpl=`galAlbumRowWithCoverTpl`]]
      </ul>
    </li>
    

    but when I am calling this chunk in Gallery snippet like:
    <ul>
    [[!GalleryAlbums? &parent=`3` &showAll=`0` &rowTpl=`parentAlbumRow`]]
    </ul>
    

    Result looks like this:


    I found out that if I add
    - [[+id]]
    at the end of line with snippet call in parentAlbumRow chunk, so it looks like:
    <li[[+cls:notempty=` class="[[+cls]]"`]]><a href="[[~[[*id]]? &[[+albumRequestVar]]=`[[+id]]`]]">[[+showName:notempty=`[[+name]]`]]</a>
      <ul>
      [[!GalleryAlbums? &parent=`[[+id]]` &showAll=`0` &albumCoverSort=`random` &rowTpl=`galAlbumRowWithCoverTpl`]] - [[+id]]
      </ul>
    </li>
    

    I’ll get desired result like:


    But I would like to get rid of album ID. Can anyone tell me what I am doing wrong? Thank you so much.
      • 37317
      • 77 Posts
      did you ever sort this out?
        • 41958
        • 65 Posts
        I have a question related somewhat to this:
        How to put css selectors to work with gallery?

        like so: I have this call [[!GalleryAlbums ]] in my template.
        How to put class="active" on the link for the selected gallery almbum (or any other css call)?