Attachment Gallery Macro
Last modified by Thomas Mortagne on 2026/02/26 15:35
| Displays all image attachments as an image Gallery |
| Type | XAR |
| Category | |
| Developed by | |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Displays all images found in the current page's attachments as an image gallery.
This macro extends the Gallery Macro by doing the following:
{{velocity}}
#set ($attachments = $doc.attachmentList)
#if ($attachments.size() > 0)
{{gallery}}
#foreach($attachment in $attachments)
#if($attachment.isImage())
[[image:$attachment.filename]]
#end
#end
{{/gallery}}
#end
{{/velocity}}Usage
{{attachmentGallery/}}Example

Dependencies
Dependencies for this extension (vincentmassol:attachmentgallerymacro ):
- org.xwiki.platform:xwiki-platform-rendering-macro-gallery 3.0-milestone-3