Changes for page XWiki Syntax Guide
Last modified by Ludovic Dubost on 2020/07/30 11:21
From version 6.1
edited by Ludovic Dubost
on 2015/11/28 14:59
on 2015/11/28 14:59
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-help-ui-7.3]
To version 10.1
edited by Ludovic Dubost
on 2020/07/30 11:21
on 2020/07/30 11:21
Change comment:
Install extension [org.xwiki.platform:xwiki-platform-help-ui/12.3]
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -9,12 +9,10 @@ 9 9 #set($SUPPORTED_SYNTAX_ORDER = ['1.0', '2.0', '2.1']) 10 10 ## 11 11 ## filter all syntaxes that are not installed/configured 12 -#set($configuredSyntax Ids = $xwiki.getConfiguredSyntaxes())12 +#set($configuredSyntaxes = $services.rendering.getConfiguredSyntaxes()) 13 13 #set($enabledSyntaxIds = []) 14 -#foreach($syntax in $services.rendering.getAvailableParserSyntaxes()) 15 - #if($configuredSyntaxIds.contains($syntax.toIdString())) 16 - #set($discard = $enabledSyntaxIds.add($syntax.toIdString())) 17 - #end 14 +#foreach($syntax in $configuredSyntaxes) 15 + #set($discard = $enabledSyntaxIds.add($syntax.toIdString())) 18 18 #end 19 19 #set($unavailableSyntaxes=[]) 20 20 #foreach($supportedSyntax in $SUPPORTED_SYNTAX_ORDER) ... ... @@ -35,7 +35,7 @@ 35 35 36 36 #set ($crtCategoryId = "$!{request.category}") 37 37 #if ($crtCategoryId != '') 38 - #set ($crtCategoryId = $m athtool.toInteger($crtCategoryId))36 + #set ($crtCategoryId = $numbertool.toNumber($crtCategoryId).intValue()) 39 39 #end 40 40 #set ($crtSectionId = "$!{request.section}") 41 41 #set ($crtSyntaxVer = "$!{request.syntax}") ... ... @@ -114,7 +114,7 @@ 114 114 #end 115 115 116 116 ## Add new sections to category children map 117 - #set($child = {'id' : $sectionDoc. getName().substring(11), 'minSyntax' : $obj.getProperty("minSyntaxId").value, 'maxSyntax' : $obj.getProperty("maxSyntaxId").value, 'name' : $sectionTitle})115 + #set($child = {'id' : $sectionDoc.documentReference.name.substring(11), 'minSyntax' : $obj.getProperty("minSyntaxId").value, 'maxSyntax' : $obj.getProperty("maxSyntaxId").value, 'name' : $sectionTitle}) 118 118 $catChildren.add($child) 119 119 #end 120 120 #end ... ... @@ -161,9 +161,9 @@ 161 161 ## 162 162 #foreach ($category in $syntaxMenu) 163 163 ## "Standard" URLs and icons for categories 164 - #set ($category.url = "?syntax=$escapetool.url(${crtSyntaxVer})&category=${mathtool.sub($ velocityCount, 1)}${extraParams}")162 + #set ($category.url = "?syntax=$escapetool.url(${crtSyntaxVer})&category=${mathtool.sub($foreach.count, 1)}${extraParams}") 165 165 #set ($category.cssClass = "${category.id}Icon") 166 - #if ("$!{crtCategoryId}" != '' && $ velocityCount == $mathtool.add($crtCategoryId, 1))164 + #if ("$!{crtCategoryId}" != '' && $foreach.count == $mathtool.add($crtCategoryId, 1)) 167 167 #set ($crtCategory = $category) 168 168 #end 169 169 ## ... ... @@ -310,11 +310,11 @@ 310 310 ##----------------------------------------- 311 311 ## syntax-page display 312 312 ##----------------------------------------- 311 + #set ($subHeading = '===') 313 313 (% id="syntax-page-content" %)((( 314 314 #if(!$crtSection && !$crtCategory) 315 315 #syntax_displayCategories($syntaxMenu 'syntax.') 316 316 #elseif (!$crtSection) 317 - #set ($subHeading = '===') 318 318 #syntax_displayCategory($crtCategory.children 'syntax.' '==') 319 319 #else 320 320 #syntax_displaySection($crtSection 'syntax.' false)