Attachment Gallery Macro

Last modified by Thomas Mortagne on 2026/02/26 15:35

cogDisplays all image attachments as an image Gallery
TypeXAR
Category
Developed by

Vincent Massol

Rating
1 Votes
LicenseGNU Lesser General Public License 2.1

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

attachmentGallery.png

Dependencies

Dependencies for this extension (vincentmassol:attachmentgallerymacro ):

  • org.xwiki.platform:xwiki-platform-rendering-macro-gallery 3.0-milestone-3

Get Connected