Attachment Gallery Macro

Last modified by Oana Florea on 2024/07/05 17:47

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

Vincent Massol

Rating
1 Votes
LicenseGNU 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

attachmentGallery.png

Get Connected