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

    I need some help only showing a single gallery instead of all galleries. And Maybe there is a much better way to go about this than the mess I have put together so far.

    Basic overview: I don't want a traditional "galley" where you have a grid of galleries. On the site that I am building there are projects, and when you click into a project there is a single thumbnail and a link to launch a gallery.

    Here is a live but STATIC example of what I am trying to do. https://nativeplainsok.com/projects/farm.html

    I have a TV setup to select the gallery for each project. I am able to get those images, although hidden, to output to the page for only my selected gallery using:
    [[!Gallery? &toPlaceholder=`gallery`&album=`[[*Gallery]]`]]


    Is there a way to tell it to only list the gallery that matches [[*Gallery]] ?

    If there are way easier ways to do this I would love to hear that as well. I'd like to avoid it if possible, but as a last resort I could just hard-code the gallery button (it triggers the gallery with jquery) and use an addioinal TV for the image thumbnail.

    Here is the full code for the gallery portion:
    [[!Gallery? &toPlaceholder=`gallery`&album=`[[*Gallery]]`]]
    [[!GalleryItem]]
    [[!GalleryAlbums? &toPlaceholder=`galleries`&thumbWidth=`1200`&thumbHeight=`auto`&thumbZoomCrop=`0`&limit=`0`]]
     
    <div style="float: right">
    <h2>Galleries</h2>
    <ul>
    [[+galleries]]
    </ul>
    </div>
    <ul id="thegallery">
    [[!+gallery:notempty=`
    [[+gallery]]
    `]]
    </ul>
    


    GalleryAlbums does not seem to have a way to specify an album like Gallery does.

    Here is the rest of the coder for reference.

    galItemThumb
    <li><a data-fancybox="group" href="[[+image_absolute]]"></a></li>


    galAlbumRowTpl
    <img src="[[+image]]" alt="[[+description]]" />
    <a id="launch" href="javascript:;">[[+showName:notempty=`[[+name]]`]]</a>
    


    I appreciate any help!
    Thanks,
    Steve
      • 17301
      • 932 Posts
      Honestly, how I would approach this would be to set each project as a resource within a respective parent resource. Then I would use modGallery from modmore.com (https://www.modmore.com/?via=1346) to create the project resources are 'gallery resources' - meaning each resource will have its own gallery. On the gallery page you could then feed in one single image for the thumbnail, or setup a TV individually for it, and then have the rest of the gallery show on click using your front-end JS skills.

        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.