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

    I am using Modx Revolution 2.2.8-pl. I am having two pages, on one I am displaying all the prominent albums and after clicking on one album thumbnails get displayed.

    Then I have another page, where I want to display just albums from a non-prominent parent album. What is the best way to do it ? I cant manage to display just the childrens of one album.

    My syntax looks like this:

    [[!GalleryAlbums? &albumRequestVar=`Photoshooting` &toPlaceholder=`GalleryAlbums` &limit=`0` &albumCoverSort=`rank` &prominentOnly=`0` &rowTpl=`GalleryAlbumRowTpl` &thumbWidth=`140` &thumbHeight=`100`]]
     
    [[!Gallery? &checkForRequestTagVar=`1` &toPlaceholder=`Gallery` &useCss=`0` &containerTpl=`GalleryAlbumTpl` &thumbWidth=`180` &thumbHeight=`140` &thumbTpl=`GalleryItemThumb` &imageWidth=`1200` &imageHeight=`800`]]
     
    [[!If? &subject=`[[+Gallery]]` &operator=`isempty` &then=`[[+GalleryAlbums]]` &else=`[[+Gallery]]`]]
    [[+GalleryAlbums]]
    [[+Gallery]] 
    
    [[!GalleryAlbums? &toPlaceholder=`GalleryAlbums` &limit=`0` &albumCoverSort=`rank` &prominentOnly=`0` &rowTpl=`GalleryAlbumRowTpl` &thumbWidth=`140` &thumbHeight=`100`]]
     
    [[!Gallery? &checkForRequestTagVar=`1` &toPlaceholder=`Gallery` &useCss=`0` &containerTpl=`danyAlbumContainer` &thumbWidth=`195` &thumbHeight=`140` &thumbTpl=`GalleryItemThumb` &imageWidth=`1200` &imageHeight=`800`]]
     
    [[!If? &subject=`[[+Gallery]]` &operator=`isempty` &then=`[[+GalleryAlbums]]` &else=`[[+Gallery]]`]]


    Anyone can help ? I try to find the answer, but no luck at all.

    Thanks in advance.

    This question has been answered by davidpede. See the first response.

    [ed. note: basta last edited this post 13 years, 1 month ago.]
    • discuss.answer
      • 44234
      • 219 Posts
      The parent parameter should do this for you:
      [[!GalleryAlbums? &parent=`ID number of your parent album` &showAll=`0`]]

      You must set &showAll to zero or it will show all albums regardless of their parent.
        Find me on Twitter, GitHub or Google+
        • 2850
        • 23 Posts
        Hey David,

        thanks, that worked.... I tried the parent parameter, but I didnt think about the showAll. That solved it.

        Thanks again !