Modifications pour le document Expand
Modifié par superadmin le 21/07/2025 - 08:55
Résumé
-
Propriétés de la Page (1 modifications, 0 ajouts, 0 suppressions)
-
Objets (2 modifications, 0 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -3,8 +3,9 @@ 3 3 = Parameters = 4 4 5 5 |=Parameter|=Description|=Required|=Default 6 -|**title**|Text displayed on the collaspse toggle|No| Click here to expand...6 +|**title**|Text displayed on the collaspse toggle|No|(empty) 7 7 8 +Note: if no title is provided, the title of the first panel or the first header appearing in the content will be used. if there is no such header or panel title, "Click here to expand…" will be used. 8 8 9 9 = Example Usage = 10 10
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -7,7 +7,14 @@ 7 7 <summary> 8 8 <span class="panel-title"> 9 9 <span class="glyphicon glyphicon-menu-right" aria-hidden="true"></span> 10 - $services.rendering.escape($escapetool.xml("${wikimacro.parameters.title}"), 'xwiki/2.1') 10 + #set ($title = $wikimacro.parameters.title) 11 + #if ("$!title" == "") 12 + #set ($title = $services.promacroexpand.getAutoTitle($wikimacro.content, $xwiki.currentContentSyntaxId)) 13 + #if ("$!title" == "") 14 + #set ($title = $services.localization.render("rendering.macro.expand.defaultexpandtitle")) 15 + #end 16 + #end 17 + $services.rendering.escape($escapetool.xml($title), $xwiki.currentContentSyntaxId) 11 11 </span> 12 12 </summary> 13 13 <div class="panel-body">
- XWiki.WikiMacroParameterClass[0]
-
- Valeur par défaut du paramètre
-
... ... @@ -1,1 +1,0 @@ 1 -Click here to expand...