We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23946
    • 4 Posts
    Forgive me if this is a stewpid question, am just getting started with modx and maxigallery here.

    I am making a catalogue site and am using ditto to display a list of products. The list displays a thumbnail of each product using maxigallery and I want each thumbnail to link to the product document. To do this I have created a custom &galleryPictureTpl like this:

    <a href="[+maxigallery.picture_link_url+]"><img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" title="[+maxigallery.picture.title:htmlent+]" alt=`[+maxigallery.picture.descr:htmlent+]` /></a>


    This all works well except when I click through from the thumbnail maxigallery appends the querystring parameter ’pic’ on to the URL. (This is not what I want because I am using slimbox on the product pages.)

    I guess I just need the plain page URL like you get with [~[+id]~]. Is there a way I can do this within the maxigallery template?

      • 23946
      • 4 Posts
      Yes, it was a stupid question! Have worked this out now. The solution was to customise the &galleryPictureTpl and also the &galleryOuterTpl so that just plain img tags are returned. The anchor can then be created in the ditto template which then makes it possible to use ~[+id+]~ to insert the URL to the page.