Изменения документа Поддомены2


<
От версии < 6.1
отредактировано Andrey Shilin
на 2025/07/10 15:52
К версии < 4.1 >
отредактировано Andrey Shilin
на 2025/04/28 14:40
Изменить комментарий: Imported from XAR

Комментарий

Подробности

Свойства страницы
Содержимое
... ... @@ -5,8 +5,6 @@
5 5  #if ($request.getCookie('subdomain'))
6 6   #set($cookie = $request.getCookie('subdomain'))
7 7   #set ($currentSubDomain = $util.decodeURI($cookie.value))
8 -#elseif($request.get('subdomain'))
9 - #set ($currentSubDomain = $request.get('subdomain'))
10 10  #end
11 11  #set ($mainDoc = $xwiki.getDocument('Main.WebHome'))
12 12  #set ($subdomains= [] )
... ... @@ -28,15 +28,12 @@
28 28   #if ($docTitle == '')
29 29   #set ($docTitle = $childDoc.getDocumentReference().getParent().getName())
30 30   #end
31 - #set($docRef = $childDoc.getDocumentReference().getParent().getName())
32 32   #if($selfShow)
33 - #set($row = '[[' + $docTitle + '>>' + $doc.getTranslatedDocument() + '||value="' + $escapetool.xml($docRef) + '"]]')
30 + #set($row = '[[' + $docTitle + '>>' + $doc.getTranslatedDocument() + '||value="' + $escapetool.xml($docTitle) + '"]]')
34 34   #else
35 35   #set($row = $docTitle)
36 36   #end
37 - #set($sortCode = "99999999")
38 - #set($sortCode = $xobject.getValue('sortCode'))
39 - #set ($discard = $subdomains.add({"title": $docTitle, "value": $row, "docRef":$docRef,"sortCode":$sortCode}))
34 + #set ($discard = $subdomains.add({"title": $docTitle, "value": $row}))
40 40   #end
41 41  #end
42 42  ## Пункт "Все"
... ... @@ -45,10 +45,10 @@
45 45  #else
46 46   #set($row = "Все")
47 47  #end
48 -#set ($menuSubDomains = [{"title": '', "docRef":'',"value": $row}])
49 -#set ($discard = $menuSubDomains.addAll($collectiontool.sort($subdomains, ["sortCode","title", "value"])))
43 +#set ($menuSubDomains = [{"title": '', "value": $row}])
44 +#set ($discard = $menuSubDomains.addAll($collectiontool.sort($subdomains, ["title", "value"])))
50 50  #foreach ($row in $menuSubDomains)
51 -#if ($row.docRef == $currentSubDomain and $selfShow)
46 +#if ($row.title == $currentSubDomain and $selfShow)
52 52  * **$row.value**
53 53  #else
54 54  * $row.value

Содружество стран

Языки