We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25586
    • 105 Posts
    Hi all,

    I think there is a simple solution for my question, but I havent found a solution so far smiley.

    Here is the code for the normal childgallerytpl.html:
    <li>
    	<a href="[+maxigallery.childurl+]">
    <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" title="[+maxigallery.strings.go_to_gallery+]" alt="[+maxigallery.strings.go_to_gallery+]" />		
    	</a>
    	<p style="width:[+maxigallery.picture_width_thumb+]px;">[+maxigallery.pageinfo.pagetitle:htmlent+]</p>
    </li>


    As you can see there is only one preview image available. Is there a solution to get more images? Max 4 for instance?

    Hope I made myself clear smiley

    Tnx!

    Rogier
      • 7923
      • 4,213 Posts
      no, you need to implement it a bit differently... list the childgallery documents with ditto and use maxigallery in ditto’s template to retrieve pictures from the gallery (&view_gallery=`[+id+]` &limit=`4`)


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 25586
        • 105 Posts
        Ahh Thanks so far, its working but the links of the four images point to the image (/document/?pic=25&from_id=2) How can I get them to change to the child document (/document/)?

        Here is a template i use:

        [+maxigallery.embedtype:isnot=`smoothgallery`:then=`
        <li> [+maxigallery.embedtype:is=``:then=` <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+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" /> </a> [+maxigallery.picture.title:isnot=``:then=`
          <p style="width: [+maxigallery.picture_width_thumb+]px;"> [+maxigallery.picture.title:htmlent+] </p>
          `+] </li>
        `+]


        I tried changing [+maxigallery.picture_link_url+] to [+id+] but thats not working sad.

        Would be great!

        Rogier
          • 7923
          • 4,213 Posts
          <li> 
             <a href="[~[+maxigallery.picture.gal_id+]~]">
                <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" title="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" /> 
             </a>
             [+maxigallery.picture.title:isnot=``:then=`
                <p style="width: [+maxigallery.picture_width_thumb+]px;">
                   [+maxigallery.picture.title:htmlent+]
                </p>
             `+]
          </li>
          


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 25586
            • 105 Posts
            Ahh thank yo so much doze! You’re the man wink