Modifications pour le document Nuage de tags
Modifié par superadmin le 2021/12/12 21:56
modifié par Paul Libbrecht (admin)
sur 2016/07/26 22:00
sur 2016/07/26 22:00
modifié par Administrator
sur 2013/06/04 10:05
sur 2013/06/04 10:05
Commentaire de modification :
Import
Résumé
Détails
- Propriétés de la Page
-
- Auteur du document
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. adminPolx1 +XWiki.Admin
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -2,7 +2,6 @@ 2 2 text-align: justify; 3 3 /* Overriding of toucan value */ 4 4 margin: 0; 5 - padding: 0; 6 6 } 7 7 8 8 div#dashboardleft ol.tagCloud {
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -1,8 +1,7 @@ 1 1 {{velocity}} 2 2 ## 3 3 ## tagCloudSpace - the space to display the tag cloud for. If blank, display cloud for the whole wiki. Default is blank. 4 -#set ($tagCloudSpace = $xcontext.macro.params.get('space')) 5 -#set ($tagCloudSpaces = $xcontext.macro.params.get('spaces')) 4 +#set ($tagCloudSpace = $context.macro.params.get('space')) 6 6 ## 7 7 ## Configurable popularity levels. You must enter an even number of levels. Default: 6. 8 8 #set ($popularityLevels = ["notPopular", "notVeryPopular", "somewhatPopular", "popular", "veryPopular", "ultraPopular"]) ... ... @@ -10,22 +10,8 @@ 10 10 ## 11 11 $xwiki.ssx.use('XWiki.TagCloud')## 12 12 ## 13 -#if( $tagCloudSpace && $tagCloudSpaces ) 14 - {{error}} 15 - ##Do not use space and spaces parameter in the same time. 16 - {{translation key="xe.tag.paramerror" /}} 17 - {{/error}} 18 - #break 19 -#end 20 - 21 -##If multiple spaces with "spaces" parameter 22 -#if( $tagCloudSpaces ) 23 - #set ($tagCount = $xwiki.tag.getTagCountForSpaces($tagCloudSpaces)) 24 -#else 25 - ##If only one space 26 - ## Get tag count map. Key: tag, value: number of occurrences. 27 - #set ($tagCount = $xwiki.tag.getTagCount("$!tagCloudSpace")) 28 -#end 12 +## Get tag count map. Key: tag, value: number of occurrences. 13 +#set ($tagCount = $xwiki.tag.getTagCount("$!tagCloudSpace")) 29 29 ## 30 30 ## Only build popularity map if at least one tag exists 31 31 #if ($tagCount.size() > 0) ... ... @@ -33,8 +33,8 @@ 33 33 ## Store the minimum and maximum number of occurrences. 34 34 #set ($sortedTagCounts = $sorttool.sort($tagCount.values())) 35 35 #set ($maxIndex = $sortedTagCounts.size() - 1) 36 - #set ($minCount = $sortedTagCounts [0])37 - #set ($maxCount = $sortedTagCounts [$maxIndex])21 + #set ($minCount = $listtool.get($sortedTagCounts, 0)) 22 + #set ($maxCount = $listtool.get($sortedTagCounts, $maxIndex)) 38 38 ## 39 39 ## Calculate the total number of tags in the wiki. 40 40 #set ($totalTagNumber = 0)
- XWiki.WikiMacroParameterClass[1]
-
- Description du paramètre
-
... ... @@ -1,2 +1,0 @@ 1 -Spaces to display the tag cloud for. Spaces name must be separate by "," character and "'". 2 -(i.e. spaces="'My Space','Space2'") - Paramètre obligatoire
-
... ... @@ -1,1 +1,0 @@ 1 -0 - Nom du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -spaces