thumbTpl
Last updated Mar 6th, 2021 | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$311 per month—let's make that $500!
Learn moreGallery's thumbTpl Chunk¶
This is the Chunk displayed with the &thumbTpl property on the Gallery snippet.
Default Value¶
<div class="[[+cls]]">
<a href="[[+linkToImage:if=`[[+linkToImage]]`:is=`1`:then=`[[+image_absolute]]`:else=`[[~[[*id]]?
&[[+imageGetParam]]=`[[+id]]`
&[[+albumRequestVar]]=`[[+album]]`
&[[+tagRequestVar]]=`[[+tag]]` ]]`]]">
<img class="[[+imgCls]]" src="[[+thumbnail]]" alt="[[+name]]" />
</a>
</div>
Available Placeholders¶
Name | Description |
---|---|
name | The name of the Item. |
filename | The base filename of the Item. |
filesize | The size of the file for the Item. |
thumbnail | A URL to the generated thumbnail image for this Item. |
image | A URL to the generated image for this item. |
image_absolute | The actual image URL (instead of the thumbnail/image placeholders which have been run through phpthumb based on snippet properties). |
description | The description of the item. |
mediatype | The media type of the Item. Currently this is only 'image'. |
createdon | The timestamp that this Item was created on. |
createdby | The User ID of the creator of this Item. |
active | If this Item is active or not. Can be 1 or 0. |
tags | A list of Tags associated with this Item. |
cls | The value of the &itemCls property on the Gallery Snippet. Defaults to 'gal-item'. |
linkToImage | In the default content, if true, will link directly to the Image rather than appending the imageGetParam placeholder to a request param. Defaults to 1. |
imageGetParam | The GET param to use when adding a GET param to link with the GalleryItem snippet. Defaults to 'galItem'. |
albumRequestVar | The GET param to use to add when linking with the GalleryItem snippet. Clicking the image will stay on the selected Album with this Snippet. |
album | The currently displayed Album. |