We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38793
    • 18 Posts
    Hi, Originally posted this here https://forums.modx.com/thread/82726/modx-revo---using-a-gallery-call-in-a-chunk-throws-up-error#dis-post-456600

    but thought I would make a post here as i am asking a question specific to Gallery.

    I have successfully listed my gallery albums on my galleries page but how do you implement a link to the resource page that each individual gallery is on.

    I will add more info if needed later like row template etc, if needed, as i am unable to at the moment.

    I have searched and been scratching my head a lot for the past few days, am I missing something obvious?

    Tim

    [ed. note: timbo_la last edited this post 13 years, 7 months ago.]
      • 38793
      • 18 Posts
      okay this is what I have so far.

      I use the call below:
      [[!GalleryAlbums?  &parent=`6` &showAll=`0`  &numThumbs=`5` &sort=`name` &dir=`ASC` &rowTpl=`gallery_albums_tpl`]]


      the &rowTpl=`gallery_albums_tpl`
      <div class="spacer"></div>
      <div class="ap_collections_container">
      
      <div class="ap_collections_thumbs_container">
      <div class="ap_collections_title_text">
      <span>[[+name]]</span>
      </div>
      
      [[Gallery?
      &album=`[[+id]]`
      &limit=`5`
      &thumbWidth=`165`
      &thumbHeight=`165`
      &thumbTpl=`gallery_thumbs_tpl`
      ]]
      
      
      </div> <!-- ap_collections_thumbs_container END -->
      
      <span class="ap_collections_info">Year: 1999-2004</span> 
      <span class="ap_collections_info">artworks: 25 pieces</span>
      <span class="ap_collections_view_more"><a href="[[*alias]]" Title="Click to view more">View more...</a></span>
      
      <div class="clear_all"> </div> <!-- clear_all END -->
      </div> <!--  ap_collections_container  END -->


      to get this



      You can see I have the [[*alias]] call in the href tag but that is just calling the alias for the galleries page and not the resource page I want to link to.

      As i mentioned in my previous post, in modx evo you can call maxigallery in a wayfinder call and it would be ok, it is a pity I can't use Gallery in a Wayfinder template.

      Tim
        • 38793
        • 18 Posts
        A quick update for.

        I have managed to do what I wanted to achieve using the add-on FileDir.

        Tim