Changes for page Scripting API Guide

Last modified by Sergei Kulagin on 2022/11/29

<
From version < 44.1 >
edited by Vincent Massol
on 2018/10/23
To version < 45.1 >
edited by Vincent Massol
on 2019/05/20
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -260,3 +260,14 @@
260 260  #set ($discard = $myDoc.save("some comment explaining the change", true))
261 261  {{/velocity}}
262 262  {{/code}}
263 +
264 += List all attachments of a page =
265 +
266 +{{code}}
267 +{{velocity}}
268 +#set ($myDoc = $xwiki.getDocument('Main.attachment.WebHome'))
269 +#foreach ($attachment in $myDoc.getAttachmentList())
270 + * $attachment.getFilename()
271 +#end
272 +{{/velocity}}
273 +{{/code}}

Get Connected