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

    I’m using MaxiGallery to show several views of an object with thumbnails, plus a large picture. To get this work, I followed the procedure with 2 calls to MaxiGallery, as explained in the wiki. This works fine.

    Now, on each gallery page showing an object, I would like to display one thumbnail of each object (i.e. sibling documents), with some text below.
    The logical approach to this is using Ditto and Ditto’s template calling MaxiGallery.

    I’ve some difficulty in setting MaxiGallery so that outputed thumbnails do not link anything themselves.
    However, those thumbnails must be included, with some desciptive text, in a link to the concerned sibling document. Here is my Ditto chunk:
    <div style="float:left; width:80px; margin:1em; text-align:right;">
    <a href="[~[*id*]~]" title="[+pagetitle+]" >
    [!MaxiGallery? &view_gallery=`[+id+]`  &display=`normal` &limit=`1` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:` !]<br />
    [*pagetitle*]<br />
    [*description*]<br />
    </a>
    </div>


    I considered using &display=`pictureview` but the picture outputed by MaxiGallery must be a thumnail and not the large picture.

    Should I define some special MaxiGallery template to layout the thumbnails ?

    Can someone help me find the correct settings ?
    Thanks.
      • 7923
      • 4,213 Posts
      Create custom &galleryPictureTpl chunk based on the original and modify it for your needs. You can remove all the PHx conditional blocks from it that you don’t need and remove the links.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 15001
        • 697 Posts
        Thanks, I’ll try.

        Have another small problem, when the uploaded pictures are in vertical "portrait" format, they are not resized to the maximal height.

        My main picture is called by:
        [!MaxiGallery? &max_thumb_size=`80x60` &max_pic_size=`560x420` &pictureTpl=`@FILE:/assets/snippets/maxigallery/templates/pictureTpl_reference.tpl` &display=`pictureview` &manageOuterTpl=`CODE:` &manageButtonTpl=`CODE:` !]


        If the picture is in "landscape" format, it is correctly sized to 560px.
        But if it is in portrait format and more than 420px, it is not resized to 420px height.

        Is there a way to set the maximal height for pictures?
          • 7923
          • 4,213 Posts
          You’d be better off by using maxigallery to just do rough resizing to some general smaller size, then use phpThumb in maxigallery templates to resize the pictures to what ever size you need.

          phpThumb offers much better resizing options together with cropping capabilities etc.


            "He can have a lollipop any time he wants to. That's what it means to be a programmer."
            • 15001
            • 697 Posts
            There was a mistake in my code and now the specified image height is also correctly taken into account.

            I’ll keep in mind phpThumb if I need one day to do more sophisticated resizing.

            @Doze: Many thanks to you!