We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39044
    • 10 Posts
    hello.

    this issue of mine might seem newby, but since i'm new to php and coding, i find-it very difficult on fixing-it.
    on my site www.difine.eu/products.html i have to load "standard covers" album at opening, with the "size 1" image and it's description.
    in order to do so i had to call galleryitem snippet like this: [[!galleryitem? &id="xx"]]
    this shows up nicely for the album that has to be displayd at loading of products.
    the issue appears after i switch the album . the image displayd is still the one from the initial album. is normal so, because the galleryitem call is with a specific id.
    the only idea i cam up with is to make a snippet to search within the current album, the photo that has a tag, let's say "cover" and return it's id. then change the call to [[!galleryitem? &id="[[snippet]]"]] , and it should work.

    however i lack the knowledge to create such a snippet.
    if you have any ideas or any way to fix-it then i am realy gratefull
    here's the code for my products page:
    <div id="galwrap">
    <div style="text-align: center;"> </div>
    [[!GalleryItem? &id=`48`]]
     [[!+galitem.image:notempty=`
    <div class="image">
    <div id="itemstyle"><a class="difine" title="[[+galitem.name]]" href="[[!+galitem.image]]"> <img class="gallimg" src="[[+galitem.image]]" alt="[[+galitem.name]]" height="95%" /> </a> <br /> <span style="font-family: Cambria, serif; font-size: small;"> <strong>[[+galitem.name]]</strong> </span> <br />
    </div>
    </div>
    `]]
    <div id="sidestyle">
    <h1>Description:</h1>
    <p class="galldescription"> [[+galitem.description]] </span></p>
    </div>
    <div id="albumside">
    [[!GalleryAlbums? &toPlaceholder=`galleries` &useAlbumCoverTag=`1` &albumCoverTag=`cover`]]
    <ul>
    <span id="sub3">[[+galleries]]</span>
    </ul>
    </div>
    <div class="dimensions">
    <h4>Dimensions</h4>
    </div>
    <div class="albumview">
    [[!Gallery? &album=`1` &toPlaceholder=`gallery`]]
    [[+gallery]]
     <br /> <br />
    <h1><a href="[[~26]]" class="link">Want a different leather or color?</a></h1>
    </div>
    
    </div>
    
    • You need to make sure all your placeholder tags are uncached as well, or the values being set by those non-cacheable Snippet calls will remain the same after the first execution.
        • 39044
        • 10 Posts
        i did that. thanks for the tip. but there's still the construction of that snippet. can you please give me some hints on where and what to look for?