Änderungen von Dokument Menu Macro
Zuletzt geändert von xwikiadmin am 2025/01/07 11:25
Von Version 2.1
bearbeitet von xwikiadmin
am 2022/08/11 16:36
am 2022/08/11 16:36
Änderungskommentar:
Migrated property [defaultCategories] from class [XWiki.WikiMacroClass]
Auf Version 3.1
bearbeitet von xwikiadmin
am 2022/08/11 16:40
am 2022/08/11 16:40
Änderungskommentar:
Install extension [org.xwiki.platform:xwiki-platform-menu-ui/14.6]
Zusammenfassung
-
Seiteneigenschaften (1 geändert, 0 hinzugefügt, 0 gelöscht)
-
Objekte (2 geändert, 0 hinzugefügt, 0 gelöscht)
Details
- Seiteneigenschaften
-
- Inhalt
-
... ... @@ -3,9 +3,11 @@ 3 3 = Horizontal Menu = 4 4 5 5 {{velocity}} 6 +#set ($menuTemplateDoc = $xwiki.getDocument('MenuTemplate')) 6 6 {{code language="none"}} 7 7 {{menu type="horizontal fixedWidth"}} 8 -$xwiki.getDocument('MenuTemplate').content 9 +## No way to escape content in the code macro, so just remove {, see https://jira.xwiki.org/browse/XRENDERING-13. 10 +$menuTemplateDoc.content.replace('{', '') 9 9 {{/menu}} 10 10 {{/code}} 11 11 {{/velocity}}
- XWiki.StyleSheetExtension[1]
-
- Code
-
... ... @@ -126,7 +126,6 @@ 126 126 font-size: @font-size-base; 127 127 text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer) 128 128 background-color: @dropdown-bg; 129 - border: 1px solid @dropdown-fallback-border; // IE8 fallback 130 130 border: 1px solid @dropdown-border; 131 131 border-radius: @border-radius-base; 132 132 .box-shadow(0 6px 12px rgba(0,0,0,.175));
- XWiki.WikiMacroClass[0]
-
- Makro-Code
-
... ... @@ -9,10 +9,14 @@ 9 9 #set ($discard = $xwiki.ssx.use("$xcontext.macro.doc.prefixedFullName", {'colorTheme': $colorTheme})) 10 10 #set ($discard = $xwiki.jsx.use("$xcontext.macro.doc.prefixedFullName")) 11 11 #if($type.contains('horizontal')) 12 + ## Make sure the id is non-empty for horizontal menus as otherwise the toggle doesn't work. 13 + #if ($stringtool.isBlank("$!id")) 14 + #set ($id = $wikimacro.context.getXDOM().getIdGenerator().generateUniqueId("M", "GeneratedMenuId")) 15 + #end 12 12 (% role="navigation" class="menu-horizontal-toggle" %)((( 13 13 (% class="navbar-header" %)((( 14 14 {{html}} 15 - <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#$!{id}" aria-expanded="false"> 19 + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#$!{escapetool.xml($id)}" aria-expanded="false"> 16 16 <span class="sr-only"></span> 17 17 <span class="icon-bar"></span> 18 18 <span class="icon-bar"></span> ... ... @@ -20,13 +20,13 @@ 20 20 </button> 21 21 {{/html}} 22 22 ))) 23 - (% id="${id}" class="menu menu-$!type collapse navbar-collapse" %)((( 24 - $xcontext.macro.content27 + (% id="$!{services.rendering.escape($id, 'xwiki/2.1')}" class="menu menu-${services.rendering.escape($!type, 'xwiki/2.1')} collapse navbar-collapse" %)((( 28 + {{wikimacrocontent/}} 25 25 ))) 26 26 ))) 27 27 #else 28 - (% #if ("$!id" != '') id="$id"#end class="menu menu-$!type" %)((( 29 - $xcontext.macro.content32 + (% #if ("$!id" != '') id="${services.rendering.escape($id, 'xwiki/2.1')}"#end class="menu menu-${services.rendering.escape($!type, 'xwiki/2.1')}" %)((( 33 + {{wikimacrocontent/}} 30 30 ))) 31 31 #end 32 32 {{/velocity}} - Makroinhaltstyp
-
... ... @@ -1,0 +1,1 @@ 1 +Wiki - Default categories
-
... ... @@ -1,0 +1,1 @@ 1 +Navigation - Standardkategorie
-
... ... @@ -1,1 +1,0 @@ 1 -Navigation