Wiki source code of Get Changes Macro

Last modified by Vincent Massol on 2026/09/10 13:54

Hide last authors
Vincent Massol 1.1 1 = Example usage =
2
3 ##{{{
4 {{getChanges products="XWiki" versions="8.3%" audience="User" contextVariable="changeDocs"/}}
5
6 {{velocity}}
7 #foreach ($changeDoc in $changeDocs)
8 * $changeDoc
9 #end
10 {{/velocity}}
11 }}}##
12
13 = Result =
14
15 {{getChanges products="XWiki" versions="8.3%" audience="User" contextVariable="changeDocs"/}}
16
17 {{velocity}}
18 #foreach ($changeDoc in $changeDocs)
19 * $changeDoc
20 #end
21 {{/velocity}}
22
Vincent Massol 10.1 23 = Paging =
24
25 The macro collects at most ##limit## changes, starting at ##offset##, so that a filter matching thousands of changes
26 cannot turn one page view into thousands of document loads. Whether it had more changes to collect is published
27 beside them, in the context variable named after ##contextVariable## suffixed with ##HasMore##:
28
29 ##{{{
30 {{getChanges products="XWiki" limit="20" offset="20" contextVariable="changeDocs"/}}
31
32 {{velocity}}
33 #if ($changeDocsHasMore)
34 There are more changes to display.
35 #end
36 {{/velocity}}
37 }}}##
38

Get Connected