We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30128
    • 78 Posts
    Hi, I’m fetching random images on my frontpage and when clicked one are taken to the gallery for that image. However I’d like to replace the default "Click to zoom" text from the template chunk with a "click to go to [gallery.name]."

    However, I can’t find any placeholders that have the name for the gallery the picture are from - the closest I’ve found is "[+maxigallery.picture.title:htmlent+]" which will only return the name of the calling page, not the name of the page of the gallery.

    Galleries are created by front-end users as according to the wiki on creating front-end galleries.

    My front-page snippet-call is
    [[MaxiGallery? &gal_query_ids=`all` &order_by=`random` &pics_per_row=`3` &limit=`3` &max_thumb_size=`100 ` &galleryPictureTpl=`linkToGallery`]]
    and my linkToGallery chunk is the same as galleryPictureTpl, only with link to gallery
    <a href="[~[+maxigallery.picture.gal_id+]~]">
    instead of image
    <a href="[+maxigallery.picture_link_url+]">


    This is the image link
    <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail reflect" title="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" />

    So, is there something I can replace [+maxigallery.strings.click_to_zoom+] with such that the title contains the name of the gallery the picture is from?
      • 7923
      • 4,213 Posts
      Yes, [+maxigallery.pageinfo.pagetitle+] should do it, see available placeholders from MaxiGallery wiki page in MODx wiki.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 30128
        • 78 Posts
        Quote from: tjalve at Sep 12, 2007, 03:18 PM

        the closest I’ve found is "[+maxigallery.picture.title:htmlent+]" which will only return the name of the calling page, not the name of the page of the gallery.

        Sorry, this should have actually said: the closest I’ve found is [+maxigallery.pageinfo.pagetitle+] which will only return the name of the page where the snippet call is placed (my front page), not the name of the gallery where the picture is from.

        And by "found" it of course mean I’ve already searched the wiki for available placeholders.

        So I need something else.
          • 7923
          • 4,213 Posts
          Oh yea.. sorry. That’s ofcourse true. You need to use the GetField snippet and pass [+maxigallery.picture.gal_id+] to it and ask it return page title for you.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."