... |
... |
@@ -1,12 +1,11 @@ |
1 |
1 |
{{velocity}} |
2 |
|
-#set($attachments = $doc.getAttachmentList()) |
|
2 |
+#set ($doc = $xwiki.getDocument($doc.fullName)) |
|
3 |
+#set ($attachments = $doc.getAttachmentList()) |
3 |
3 |
|
4 |
|
-{{gallery}} |
5 |
|
-#foreach($attachment in $attachments) |
6 |
|
- #if($attachment.filename.endsWith(".jpg") || $attachment.filename.endsWith(".png") || $attachment.filename.endsWith(".webp")) |
7 |
|
- image:$attachment.filename |
|
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 |
8 |
#end |
9 |
9 |
#end |
10 |
|
-{{/gallery}} |
11 |
11 |
{{/velocity}} |
12 |
12 |
|