Changes for page Documents Macro

Last modified by Ludovic Dubost on 2024/07/22 15:50

From version 5.1
edited by Ludovic Dubost
on 2016/04/01 11:48
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-ui-8.0]
To version 2.1
edited by Thomas Mortagne
on 2014/09/29 12:38
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-ui-6.2]

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -xwiki:XWiki.ludovic
1 +xwiki:XWiki.ThomasMortagne
Content
... ... @@ -1,7 +1,7 @@
1 1  Example:
2 2  
3 -##{{{{{documents id="example" count="5" actions="false" columns="doc.title, doc.location"/}}}}}##
3 +##{{{{{documents id="example" count="5" actions="false" columns="doc.title"/}}}}}##
4 4  
5 5  Generates:
6 6  
7 -{{documents id="example" count="5" actions="false" space="Main" parent="Main.WebHome" columns="doc.title, doc.location"/}}
7 +{{documents id="example" count="5" actions="false" space="Main" parent="Main.WebHome" columns="doc.title"/}}
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -5,11 +5,10 @@
5 5   #set ($discard = $collist.add($colname.trim()))
6 6   #end
7 7  #else
8 - #set($collist = ['doc.title', 'doc.location', 'doc.date', 'doc.author'])
8 + #set($collist = ['doc.name', 'doc.space', 'doc.date', 'doc.author'])
9 9  #end
10 10  #set($colprops = {
11 - 'doc.title' : { 'type' : 'text' , 'size' : 30, 'link' : 'view', 'filterable': false, 'sortable': false },
12 - 'doc.location' : { 'type': 'text', 'filterable': true, 'html': true},
11 + 'doc.title' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
13 13   'doc.fullName' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
14 14   'doc.name' : { 'type' : 'text' , 'size' : 30, 'link' : 'view' },
15 15   'doc.space' : { 'type' : 'text', 'link' : 'space' },
... ... @@ -25,7 +25,7 @@
25 25   #set ($extraParams = "&space=$escapetool.url($xcontext.macro.params.space)")
26 26  #end
27 27  #if ("$!xcontext.macro.params.parent" != "")
28 - #set ($extraParams = "$!{extraParams}&parent=$escapetool.url($xcontext.macro.params.parent)")
27 + #set ($extraParams = "${extraParams}&parent=$escapetool.url($xcontext.macro.params.parent)")
29 29  #end
30 30  #if ("$!extraParams" != "")
31 31   #set($discard = $options.put('extraParams', $extraParams))