Changes for page Space Index

Last modified by Thomas Mortagne on 2024/04/29 10:07

From version 20.1
edited by Thomas Mortagne
on 2023/04/25 09:35
Change comment: Migrated property [type] from class [XWiki.WikiMacroParameterClass]
To version 21.1
edited by Thomas Mortagne
on 2024/04/29 10:07
Change comment: Install extension [org.xwiki.platform:xwiki-platform-index-ui/16.2.0]

Summary

Details

Page properties
Content
... ... @@ -1,10 +1,20 @@
1 1  {{velocity}}
2 -#if("$!request.space" != "") #set($space=$request.space) #else #set($space = $doc.space) #end
3 -$services.localization.render('platform.index.spaceIndexDescription', [$space])
2 +#if("$!request.space" != "")
3 + #set($space=$request.space)
4 +#else
5 + #set($space = $doc.space)
6 +#end
4 4  ## Since we display the space index, we do not display page titles and locations, but the old columns name and space
5 5  ## (old behavior consistent with this old macro)...
6 6  
7 -{{documents space="$space.replaceAll('["~]', '~$0')" id="spaceindex" columns="doc.name, doc.space, doc.date, doc.author"/}}
10 +#set ($description = $services.localization.render('platform.index.spaceIndexDescription', [$space]))
11 +#set ($description = $services.rendering.escape($description, 'xwiki/2.1'))
12 +{{documents
13 + space="$services.rendering.escape($space, 'xwiki/2.1')"
14 + id="spaceindex"
15 + columns="doc.name,doc.space,doc.date,doc.author"
16 + description="$description"
17 +/}}
8 8  #set($docextras=[])
9 9  {{/velocity}}
10 10