Changes for page Tag Cloud

Last modified by Mark Kohlmann on 2024/07/26 08:06

From version 1.1
edited by Mark Kohlmann
on 2020/04/02 23:26
Change comment: Install extension [org.xwiki.platform:xwiki-platform-tag-ui-9.4]
To version 6.1
edited by Mark Kohlmann
on 2024/07/26 07:52
Change comment: Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]

Summary

Details

XWiki.RequiredRightClass[0]
Level
... ... @@ -1,0 +1,1 @@
1 +edit
XWiki.WikiMacroClass[0]
Macro code
... ... @@ -31,7 +31,7 @@
31 31  #if ($tagCount.size() > 0)
32 32   ##
33 33   ## Store the minimum and maximum number of occurrences.
34 - #set ($sortedTagCounts = $sorttool.sort($tagCount.values()))
34 + #set ($sortedTagCounts = $collectiontool.sort($tagCount.values()))
35 35   #set ($maxIndex = $sortedTagCounts.size() - 1)
36 36   #set ($minCount = $sortedTagCounts[0])
37 37   #set ($maxCount = $sortedTagCounts[$maxIndex])
... ... @@ -48,12 +48,12 @@
48 48   #set ($secondHalfIntervalSize = $mathtool.div($mathtool.sub($maxCount, $countAverage), $levelsHalf))
49 49   ##
50 50   ## Use a sorted map
51 - #set ($popularityMap = $collectionstool.getSortedMap())
51 + #set ($popularityMap = $collectiontool.sortedMap)
52 52   #set ($previousPopularityMax = $minCount)
53 53   #set ($intervalSize = $firstHalfIntervalSize)
54 54   #set ($halfPassed = false)
55 55   #foreach ($popularityLevel in $popularityLevels)
56 - #if ($velocityCount > $levelsHalf && !$halfPassed)
56 + #if ($foreach.count > $levelsHalf && !$halfPassed)
57 57   #set ($intervalSize = $secondHalfIntervalSize)
58 58   #set ($halfPassed = true)
59 59   #end
... ... @@ -78,7 +78,7 @@
78 78   #end
79 79   #end
80 80   <li class="$liClass">
81 - <a class="tag" href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$escapetool.url($tagEntry.Key)")" title="$services.localization.render('xe.tag.tooltip', ["$tagEntry.Value"])">$escapetool.xml($tagEntry.Key)</a>
81 + <a class="tag" href="$xwiki.getURL('Main.Tags', 'view', "do=viewTag&amp;tag=$escapetool.url($tagEntry.Key)")" title="$services.localization.render('xe.tag.tooltip', [$tagEntry.Value])">$escapetool.xml($tagEntry.Key)</a>
82 82   </li>
83 83   #end
84 84   </ol>