We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17975
    • 6 Posts
    Hello
    Here is my problem: I’ve documents aggregated by Ditto with pagination (page set as non-cacheable). I display whole documents’ bodies in this listing and in some documents I have gallery from MaxiGallery call, but it doesn’t work. Depending on the Ditto call type, nothing appears (ditto cached), or MaxiGallery snippet call is visible [[MaxiGallery]] (ditto non-cached).
    Is it possible, to make it working?
    Regards
    Marek
      • 7923
      • 4,213 Posts
      This is a "feature" of MODx evo branch. You need to alter the caching of snippets inside other snippets.

      Set the document to cached (or try with uncached too, if this doesn’t work), then call Ditto as [!Ditto...!] and MaxiGallery in ditto’s template like [[maxigallery...]].


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 17975
        • 6 Posts
        thx for replaying. I checked all cache/non-cache options before posting, but this isn’t working sad. BTW, I have to call [[Ditto]] on noncached document, because of pagination.
        Any other suggestions? Beg for help wink

        ---
        OK, I got it.
        I had to pass id of document in gallery call : [[MaxiGallery? &gal_query_id=`[*id*]`]] and it works as expected. smiley
          • 18389
          • 169 Posts
          I am getting only the "manage pictures" button on the page with the ditto call.

          I have maxigallery call on a seperate page where I have the images uploaded to as:

          [[MaxiGallery?
          &max_pic_size=`585x543`
          &quality_pic=`100`
          &max_big_size=`585x543`
          &max_thumb_size=`315x315`
          &quality_thumb=`100`
          &gal_query_id=`[*id*]`
          &display=`pictureview`
          ]]

          and then again within the ditto template as:

          [[MaxiGallery? &gal_query_id=`[*id*]` ]]
          [+summary+]

          I have tried all kinds of cached and uncached combinations.

          what am I doing wrong here?
            www.markojokic.com
            • 791
            • 46 Posts
            I used [[MaxiGallery? &gal_query_ids=`[+id+]`]] in my Ditto summary listings chunk and it works a treat.

            I know this is an old topic, but if anyone’s searching for the answer, here it is!
              Learning a little more each day.
              • 18389
              • 169 Posts
              I should have posted the solution when I finally found it way back. Forgot to get back to this post.
              So now it’s solved, thanks!
                www.markojokic.com
                • 791
                • 46 Posts
                I now want to vary this slightly. The background is that it’s for an estate agent’s website. I have 3 sizes of image - small for thumbs, normal for a "poster" image against the summary listing and big for the main gallery image.

                If I use the call
                [[MaxiGallery? &gal_query_ids=`[+id+]` &limit=`1`]]
                then it displays the first thumbnail image. Great, but too small for my purposes. Can I get MaxiGallery to call the normal size image rather than the thumb?

                I have tried
                &display=`pictureview`
                and creating a chunk with
                <img id="poster" src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" alt="[+maxigallery.picture.title:htmlent+]" />
                and adding the &tpl parameter to the call, but neither work. Does anyone know the solution?
                  Learning a little more each day.
                  • 18389
                  • 169 Posts
                  I think this is what you are looking for.

                  You can change the tpl file in assets/maxigallery/templates/gallerypicturetpl.html (that is what mine is named, I may have changed that a while ago but I think it’s the original)

                  In the first lines I have:

                  [+maxigallery.embedtype:is=`smoothgallery`:then=` 
                  	<div class="imageElement">
                  	<h3>[+maxigallery.picture.title:htmlent+]</h3>
                  	<p>[+maxigallery.picture.descr:htmlent+]</p>
                  	<a href="[+maxigallery.picture_link_url+]" title="[+maxigallery.strings.click_to_zoom+]" class="open"></a>
                  	<img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="full" alt="[+maxigallery.strings.go_to_gallery+]"/>
                  	<img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.strings.go_to_gallery+]"/>
                  	</div>
                  `+]


                  I use smoothgallery so if you are using a different one find where in that code it is, but in my case I would change:

                  <img src="[(base_url)][+maxigallery.path_to_gal+]tn_[+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.strings.go_to_gallery+]"/>


                  to:

                  <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="thumbnail" alt="[+maxigallery.strings.go_to_gallery+]"/>


                  I took out the "tn_" prefix to have it call the regular file, not the thumb.

                  Does that help?
                    www.markojokic.com
                    • 791
                    • 46 Posts
                    Thanks for pointing me in the right direction markoj. On the property detail page I’m using large image and thumbs on the same page and using JavaScript to swap them when clicked. In order to get the "poster image" on the property summary listing to link to just the property detail page, rather than the individual image, I had to alter the embedtype=`` as follows:
                    [+maxigallery.embedtype:is=``:then=`
                        
                        <a href="[(base_url)]index.php?id=[+maxigallery.picture.gal_id+]">
                    
                    `+]
                        
                             <img src="[(base_url)][+maxigallery.path_to_gal+][+maxigallery.picture.filename+]" class="posterimg" title="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" alt="[+maxigallery.picture.title:htmlent+] [+maxigallery.strings.click_to_zoom+]" />
                        
                        </a>


                    So my call in the chunk that contains the property summary is:

                     <div class="listingThumb">[[MaxiGallery? &gal_query_ids=`[+id+]` &limit=`1` &embedtype=`` ]]</div>


                    I’m sure there’s probably a more elegant way of doing this (<a href="[(base_url)]index.php?id=[+maxigallery.picture.gal_id+]">), however it works, which is all I’m interested in for the time being! When the site is live and I turn on SEO-freindly URL’s I’m hoping that it’s going to still work... Anyone care to comment?
                      Learning a little more each day.
                      • 25132
                      • 129 Posts
                      @ aksteven - Many thanks!!! Was browsing through the forum for exactly this type of solution to the very same problem - and I am doing an estate agent website as well ... You have saved a bunch of hair on my head! I had figured out that this is the line I have to change but kept trying things like [~[+id+]~] without luck. The forum has saved the day yet again!