0 Votes

Changes for page AutoGallery

Last modified by Ryan C on 2025/06/17 16:30

From version 1.1
edited by Ryan C
on 2025/06/16 15:16
Change comment: There is no comment for this version
To version 2.1
edited by Ryan C
on 2025/06/17 16:06
Change comment: There is no comment for this version

Summary

Details

XWiki.WikiMacroClass[0]
Cached
... ... @@ -1,0 +1,1 @@
1 +Yes
Context elements
... ... @@ -1,0 +1,1 @@
1 +Document
Asynchronous rendering
... ... @@ -1,0 +1,1 @@
1 +No
Macro code
... ... @@ -1,0 +1,11 @@
1 +{{velocity}}
2 +#set ($doc = $xwiki.getDocument($doc.fullName))
3 +#set ($attachments = $doc.getAttachmentList())
4 +
5 +#foreach ($att in $attachments)
6 + #if ($att.filename.endsWith(".jpg") || $att.filename.endsWith(".jpeg") || $att.filename.endsWith(".png") || $att.filename.endsWith(".gif"))
7 + image: [[~${doc.fullName}@${att.filename}]]
8 + #end
9 +#end
10 +{{/velocity}}
11 +
Macro content availability
... ... @@ -1,0 +1,1 @@
1 +No content
Default categories
... ... @@ -1,0 +1,1 @@
1 +Formatting
Macro description
... ... @@ -1,0 +1,1 @@
1 +Generates a gallery of all image attachments on this page.
Execution is isolated
... ... @@ -1,0 +1,1 @@
1 +Yes
Macro id
... ... @@ -1,0 +1,1 @@
1 +autogallery
Macro name
... ... @@ -1,0 +1,1 @@
1 +AutoGallery
Supports inline mode
... ... @@ -1,0 +1,1 @@
1 +No
Macro visibility
... ... @@ -1,0 +1,1 @@
1 +Current Wiki