{module_photogallery}

Description

Renders the specified Photo Gallery as thumbnails, with a lightbox effect.

Syntax

{module_photogallery render="item|collection" id="12345" rowCount="2" targetFrame="_blank" resultsPerPage="4" width="400" height="400" useStandardMethod="true|false" thumbnail="proportional|fill_proportional|fill" collection="my_custom_collection_name" template="/folder/template.tpl"}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

  • render - possible values are item or collection (the default is item). The render parameter indicates whether the template content is used to render a collection or to render a single item. Take a look at the render parameter's article for more details on how to use it
  • id - System generated ID (Do not change this number.)
  • rowCount - Set the number of photos displayed per row
  • targetFrame - Set the destination frame where the photos will open (such as _blank)
  • resultsPerPage - Set the number of photos displayed per page
  • width/height - Set the width and height of the thumbnail images. The default value is 80 pixels wide by 80 pixels high.
  • useStandardMethod - Use the standard Thumbnail Generation. Set to false for better thumbnail quality (with increased file size).
  • thumbnail - To avoid squashed images and control image proportion size. Use the following paramaters: proportional, fill, fill_proportional.
  • collection - use this if you need to access the module's Liquid output tags
  • template - you can leave the value of the template parameter blank to suppress the original output and use Liquid output tags instead

Note: If an image is 640 pixels wide x 400 pixels high and you set the thumbnail size to 120 x 120 pixels, the thumbnail image will have a maximum width of 120 and a smaller height. Proportions are respected when creating the thumbnail image.

Alternatively if the image dimensions are 400 pixels wide x 640 pixels high, then the height will be 120 pixels and the width smaller. The thumbnail size dictates the maximum width or the maximum height of the image.

thumbnail option details

proportional: The thumbnail maintains the aspect ratio of the source image and uses the specified width or height of whichever side of the image file is proportionately bigger.

fill: The dimensions of the thumbnail are resized to fill the specified Width and Height settings as defined in the parameters; the aspect ratio of the original source image is not maintained.

fill_proportional: The dimensions of the thumbnail are resized to fill the specified Width and Height settings as defined in the parameters; the extra pixels from the top/bottom or left/right are cropped on whichever side of the image is proportionally larger, if needed, to maintain the aspect ratio of the original source image and ensure that the thumbnail does not look squashed or squished.

This module can be rendered:

  • in plain text
  • using Liquid collections - these are the Liquid output tags you can use
Liquid tag Description
{{items}}
{{photoGalleryId}} The photo gallery id
{{useLightBox}} Bollean value if using lightbox
{{link}} Url of the gallery item image
{{description}} Image caption
{{thumbnailLink}} Url for image thumbnail
{{targetFrame}} Target frame
{{pagination}}
{{currentPage}}  
{{itemsPerPage}}  
{{numberOfPages}}  
{{totalItemsCount}}  
{{previousPageUrl}} defaults to null
{{nextPageUrl}} defaults to null

 

Examples

  • {module_photogallery id="26800" rowCount="4" resultsPerPage="12" width="120" height="120" useStandardMethod="true"} - this displays 4 photos per line and a maximum of 12 photos per page. The thumbnail size has also been set to 120x120 pixels
  • {module_photogallery id="26800" collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection.
  • Syntax

    {module_photogallery,ID,rowLength,targetFrame,resultsPerPage,Width,Height,UseStandardMethod,thumbnailAlgorithm}

    Parameters

    • ID - System generated ID (Do not change this number.)
    • rowLength - Set the number of photos displayed per row
    • targetFrame - Set the destination frame where the photos will open (such as _blank)
    • resultsPerPage - Set the number of photos displayed per page
    • Width/Height - Set the width and height of the thumbnail images. The default value is 80 pixels wide by 80 pixels high.
    • UseStandardMethod - Use the standard Thumbnail Generation. Set to false for better thumbnail quality (with increased file size).
    • thumbnailAlgorithm - To avoid squashed images and control image proportion size. Use the following paramaters: proportional,fill, fill_proportional.

    Note: If an image is 640 pixels wide x 400 pixels high and you set the thumbnail size to 120 x 120 pixels, the thumbnail image will have a maximum width of 120 and a smaller height. Proportions are respected when creating the thumbnail image.

    Alternatively if the image dimensions are 400 pixels wide x 640 pixels high, then the height will be 120 pixels and the width smaller. The thumbnail size dictates the maximum width or the maximum height of the image.

    thumbnailAlgorithm option details

    proportional: The thumbnail maintains the aspect ratio of the source image and uses the specified width or height of whichever side of the image file is proportionately bigger.

    fill: The dimensions of the thumbnail are resized to fill the specified Width and Height settings as defined in the parameters; the aspect ratio of the original source image is not maintained.

    fill_proportional: The dimensions of the thumbnail are resized to fill the specified Width and Height settings as defined in the parameters; the extra pixels from the top/bottom or left/right are cropped on whichever side of the image is proportionally larger, if needed, to maintain the aspect ratio of the original source image and ensure that the thumbnail does not look squashed or squished.

    Examples

  • {module_photogallery,26800,4,,12,120,120,true} - this displays 4 photos per line and a maximum of 12 photos per page. The thumbnail size has also been set to 120x120 pixels