We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21395
    • 91 Posts
    I want to open up the first image in an album when I move from GalleryAlbums to the combined GalleryItem & Gallery page.

    Here are the calls on the page that GalleryAlbums diverts to:

    <p>[[!GalleryItem]][[!+galitem.image:notempty=`</p>
    <div class="image"><a href="[[+galitem.image]]"><img class="[[+galitem.imgCls]]" title="[[+galitem.name]]" src="[[+galitem.image]]" alt="[[+galitem.name]]" /></a>
    <p>`]]</p>
    <p>[[!Gallery? &toPlaceholder=`gallery`&itemCls=`gal-item`]]</p>
    <div id="galleryHeading">
    <h1><a href="[[~[[*id]] &galAlbum=`[[+gallery.id]]`]]">[[+gallery.name]]</a></h1>
    <p>[[+gallery.description]]</p>
    </div>
    <div id="gallery">[[+gallery]]</div>


    This is a slightly simplified version of the example code provided in rtfm.

    What I get is a thumbnail for each item in the Album. Upon clicking one of these, I get the selcted image at full size, and a thumbnail for each item in the Album.

    What I would like is for the first image in the Album to open at full size (to be pre-selected in other words) - missing out the intermediate step/click - and display the Album thumbnails below as usual.

    Has anyone done this and can let me see the mark-up and placeholders/snippet call?
      MODX Revolution 2.6.5-pl (traditional)

      Hosted on MODX Cloud

      Skype: nicbaldeagle
      • 39044
      • 10 Posts
      the only way so far is to add to your call [[!GalleryItem? &id=`(int id of pic)`]]
      the problem will be when you have multiple albums and you display them the same way. galleryitem call is going to call at initialisation the same id, not the first image in your album.

      i just hope Shaun has this thing under development.