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, 1 ajouts, 0 suppressions)
Détails
- Propriétés de la Page
-
- Contenu
-
... ... @@ -4,11 +4,12 @@ 4 4 5 5 |=Parameter|=Description|=Required|=Default 6 6 |**title**|Text displayed on the collaspse toggle|No|(empty) 7 +|**expanded**|If selected the expand will be opened automatically when loading the page.|No|False 7 7 8 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. 9 9 10 10 = Example Usage = 11 11 12 -{{expand}} 13 +{{expand expanded="false"}} 13 13 Hello 👀 14 14 {{/expand}}
- XWiki.StyleSheetExtension[0]
-
- Code
-
... ... @@ -31,6 +31,11 @@ 31 31 border: none; 32 32 } 33 33 34 +.confluence-expand-macro.panel.panel-default .panel-body ul { 35 + list-style-type: revert; 36 + padding-left: revert; 37 +} 38 + 34 34 .confluence-expand-macro.panel { 35 35 background: unset; 36 36 }
- XWiki.WikiMacroClass[0]
-
- Code de la macro
-
... ... @@ -1,7 +1,7 @@ 1 1 {{velocity output="false"}} 2 2 #macro (executeMacro) 3 3 #set ($discard = $xwiki.ssx.use('Confluence.Macros.Expand')) 4 - #set ($opened = $xcontext.action == 'edit' || $xcontext.action == 'export') 4 + #set ($opened = $xcontext.action == 'edit' || $xcontext.action == 'export' || $wikimacro.parameters.expanded) 5 5 {{html clean="false" wiki="true"}} 6 6 <details class="confluence-expand-macro panel panel-default" #if ($opened)open#end> 7 7 <summary>
- XWiki.WikiMacroParameterClass[1]
-
- Valeur par défaut du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +0 - Paramètre obligatoire
-
... ... @@ -1,0 +1,1 @@ 1 +Non - Nom du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +expanded - Type du paramètre
-
... ... @@ -1,0 +1,1 @@ 1 +java.lang.Boolean