Changes for page Tag Cloud

Last modified by Tobias Wintrich on 2024/06/27 08:20

From version 3.1
edited by Tobias Wintrich
on 2024/06/27 08:20
Change comment: Install extension [org.xwiki.platform:xwiki-platform-tag-ui/16.4.0]
To version 2.1
edited by Tobias Wintrich
on 2024/06/21 14:16
Change comment: Migrated property [type] from class [XWiki.WikiMacroParameterClass]

Summary

Details

XWiki.WikiMacroClass[0]
Macro code
... ... @@ -4,9 +4,6 @@
4 4  #set ($tagCloudSpace = $xcontext.macro.params.get('space'))
5 5  #set ($tagCloudSpaces = $xcontext.macro.params.get('spaces'))
6 6  #set ($limit = $xcontext.macro.params.get('limit'))
7 -#if ("$!limit" != '' && $limit < 0)
8 - #set ($limit = 0)
9 -#end
10 10  ##
11 11  ## Configurable popularity levels. You must enter an even number of levels. Default: 6.
12 12  #set ($popularityLevels = ["notPopular", "notVeryPopular", "somewhatPopular", "popular", "veryPopular", "ultraPopular"])
... ... @@ -42,7 +42,7 @@
42 42  ## If tags have the same occurrence, limit them in alphabetical order
43 43  #set ($tagCountListSorted = $collectiontool.sort($tagCountList, ['count:desc', 'name']))
44 44  #if ("$!limit" != '')
45 - #set ($tagCountListSorted = $tagCountListSorted.subList(0, $mathtool.min($tagCountListSorted.size(), $limit)))
42 + #set ($tagCountListSorted = $tagCountListSorted.subList(0, $limit))
46 46  #end
47 47  ##
48 48  ## Only build popularity map if at least one tag exists