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

    I'm designing a website that is making use of a gallery. The images inside the gallery are suposed to have the same width (526px), but the height must be the original height of the image. The images are not suposed to be clickable aswell.

    How can I do this?

    I'm using the following script but afcourse, it isn't working the way I want it to.

    <p>[[!Gallery? &album=`analoog` &thumbWidth=`526`]]</p> 
    [[+gallery]]


    I'm using the Gallery package in MODX revo.

    thanks in advance
    Simon [ed. note: smette last edited this post 11 years, 1 month ago.]
    • So do you want to have the thumbnails sized to 526 or the actual gallery item?

      Do you have a link to a live sample?

      The thumbWidth property sets the size of the thumbnails if you want to resize the actual image displayed you need to use the imageWidth property.

      Another property you can use is the imageZoomCrop this will allow you to resize and crop the image if you so choose to.

      Make sure to read about all the properties available when using Gallery.

      Good Luck.
        Benjamin Marte
        Interactive Media Developer
        Follow Me on Twitter | Visit my site | Learn MODX
        • 42704
        • 29 Posts
        A live sample can be viewed here:
        http://evavlonk.com/index.php?id=6

        The purpose is that Gallery loads the images inside the album on the server and views them as live samples listed from top to bottom at the width of 526px and the height must be the original size from the image.

        Thanks!
        • Do you mean that the height literally must not change, or that the height must automatically change to remain proportional to the width? Simply setting the width alone for these images in the CSS will do that. You would probably do best using a max-width:526 in the CSS in case some images are not as wide; you wouldn't want them to get stretched out.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 42704
            • 29 Posts
            Yes ! exactly ! thats the word I was looking for. The height must automatically change to remain proportional to the width. Can I use the "max-width" property inside my gallery call, or do I have to do this inside my stylesheet?
            I want the images unclickable aswel...
            any ideas?

            Thanks Sottwell!
            • Hm. Not sure about that. I would suspect that it would have to be done in the CSS, since as far as I know the Gallery will use your properties to set attributes in the image tag itself.
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 42704
                • 29 Posts
                Is there a gallery call that makes all the pictures from one current map appear?