AllWireframes

Version 1.1 by Ludovic Dubost on 2024/04/06 16:06

#macro(collectImageAttachments $spaceName)
  Search for all documents in the specified space
  #set ($query = "where doc.space = :space")
  #set ($documents = $xwiki.searchDocuments($query, $maptool.map('space', $spaceName)))

   Iterate through each document to list its attachments
  #foreach ($docFullName in $documents)
    
Get the document object
    #set ($doc = $xwiki.getDocument($docFullName))

     Get and list the image attachments
    #set ($attachments = $doc.getAttachmentList())
    #foreach ($attachment in $attachments)
      #if ($attachment.mimeType.startsWith("image/"))
       $attachment.filename
      #end
    #end
  #end
#end

France 2030 Logo

This project is being financed by the French State as part of the France 2030 program

Ce projet est financé par l’État Français dans le cadre de France 2030

  • Powered by XWiki 18.4.6 - node1. Hosted and managed by XWiki SAS

Get Connected