Closed

Point the Gallery Macro extension page at the migrated documentation

Last modified by Nicoleta Ciaușu on 2026/11/13 14:59

All changes

Summary

Details

Page properties
Title
... ... @@ -1,0 +1,1 @@
1 +Gallery Macro
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.Admin
1 +xwiki:XWiki.NicoletaCiausu
Content
... ... @@ -1,0 +1,2 @@
1 +
2 +
ExtensionCode.ExtensionClass[0]
Description
... ... @@ -1,111 +1,1 @@
1 -Images are collected from the macro content and displayed using a slide-show view (a carousel). Thus this macro content can contain any content in the current syntax and only images will be extracted and displayed in the slide show.
2 -
3 -== Usage ==
4 -
5 -{{code language="none"}}
6 -{{gallery}}
7 -image:alice.png
8 -image:[email protected]
9 -image:http://www.xwiki.org/logo.png
10 -[[image:Path.To My Page@file with space in name.jpg]]
11 -{{/gallery}}
12 -{{/code}}
13 -
14 -Note that any markup syntax (including macros) that generates HTML ##<img>## will have these images included in the gallery view (see the RSS example below for this usage).
15 -{{version since="18.0.0"}}The alternative text of images provided in the macro content is transferred to the gallery, except if this alternative text is the name of the file (default with XWiki image syntax). {{/version}}
16 -
17 -{{version since="18.9.0RC1"}}The gallery uses the panel colors of the current color theme for its background, text and border, instead of a fixed black background. Its maximize and minimize buttons use icons from the current icon theme.{{/version}}
18 -
19 -=== Shortcut Keys ===
20 -
21 -(% class="hidden" %)
22 -// This doesn't work right now because of the nested code macros policy.
23 -{{velocity}}$xwiki.ssx.use("xwiki:Documentation.UserGuide.Features.KeyboardShortcuts"){{/velocity}}//
24 -
25 -(% class="keyboard" summary="Keyboard Shortcuts for Gallery macro" %)
26 -|(% class="shortcut" %)(((
27 -(% class="key" %){{html}}&larr;{{/html}}
28 -)))|Display previous image
29 -|(% class="shortcut" %)(((
30 -(% class="key" %){{html}}&rarr;{{/html}}
31 -)))|Display next image
32 -|(% class="shortcut" %)(((
33 -(% class="key" %)Home
34 -)))|Display first image
35 -|(% class="shortcut" %)(((
36 -(% class="key" %)End
37 -)))|Display last image
38 -|(% class="shortcut" %)(((
39 -(% class="key" %)F
40 -)))|Toggle full-screen view
41 -|(% class="shortcut" %)(((
42 -(% class="key" %)Esc
43 -)))|Exit full-screen view
44 -
45 -== Parameters ==
46 -
47 -|=Name|=Description|=Default Value|=Since
48 -|class|Custom CSS class names to set on the gallery container. Use this parameter if you want to customize the appearance of a gallery instance.||8.3RC1
49 -|height|The gallery height. Empty value means no explicit height set.|349px|8.3RC1
50 -|width|The gallery width. Empty value means no explicit width set.|620px|8.3RC1
51 -
52 -== Examples ==
53 -
54 -=== Displays all the images attached to the current page ===
55 -
56 -{{info}}
57 -You can also use the [[Attachment Gallery Macro>>AttachmentGalleryMacro]] which does exactly that and which can be used as a shortcut.
58 -{{/info}}
59 -
60 -{{code language="none"}}
61 -{{velocity}}
62 -#set ($attachments = $doc.attachmentList)
63 -#if ($attachments.size() > 0)
64 - {{gallery}}
65 - #foreach($attachment in $attachments)
66 - #if($attachment.isImage())
67 - [[image:$attachment.filename]]
68 - #end
69 - #end
70 - {{/gallery}}
71 -#end
72 -{{/velocity}}
73 -{{/code}}
74 -
75 -Result:
76 -
77 -{{image reference="screenshot.png"/}}
78 -
79 -=== Displays images from a RSS feed ===
80 -
81 -Example using a Flickr feed.
82 -
83 -{{code language="none"}}
84 -{{gallery}}
85 -{{rss feed="https://api.flickr.com/services/feeds/photos_public.gne?id=44494372@N05&format=rss_200" content="true" decoration="false"/}}
86 -{{/gallery}}
87 -{{/code}}
88 -
89 -{{info}}
90 -The ##decoration="false"## parameter is only available in XWiki 3.2+
91 -{{/info}}
92 -
93 -Result:
94 -
95 -{{image reference="flickrrss.png"/}}
96 -
97 -=== Displays all images visible on a page ===
98 -
99 -{{code language="none"}}
100 -{{gallery}}
101 -{{display reference="Sandbox.WebHome"/}}
102 -{{/gallery}}
103 -{{/code}}
104 -
105 -=== Use Bootstrap Grid System ===
106 -
107 -{{code language="none"}}
108 -{{gallery class="col-xs-12 col-sm-6 col-md-4 col-lg-3" width="" height="300px"}}
109 -image:[email protected]
110 -{{/gallery}}
111 -{{/code}}
1 +Collects the images rendered by the macro content and displays them in a slide-show.
Website
... ... @@ -1,0 +1,1 @@
1 +https://www.xwiki.org/xwiki/bin/view/DocApp/Code/ExtensionLD?id=xwiki:org.xwiki.platform:xwiki-platform-rendering-macro-gallery&name=%22Gallery Macro%22

Approvers

Approvers have not been explicitly defined for this Change Request. Approvers will be based entirely on approval rights.
This Change Request has been cancelled/closed, it cannot be edited or reviewed in its current state.
No conflicts to show.
The change request cannot be published without valid approval or if at least one review request for changes.

Get Connected