8 Jul
2008
8 Jul
'08
8:01 a.m.
Nohinder wrote:
hello. i am curious about how i can retreive all of the attachments of the space. current space. i just know how to declare the "get all attach" in a menu:
#submenuitem($doc.getURL("view", "viewer = attachments&$docvariant") $msg.get("core.menu.view.attachments")) in the menuview.vm
#foreach($attDoc in $xwiki.wrapDocs($xwiki.searchDocuments(", XWikiAttachment att where att.docId = doc.id and doc.web='${doc.space}'"))) #foreach($att in $attDoc.getAttachmentList()) * <a href="$attDoc.getAttachmentURL($att.filename)">${att.filename} (${attDoc.displayTitle})</a> #end #end -- Sergiu Dumitriu http://purl.org/net/sergiu/