Changes for page Home
Last modified by Isaac Mejia on 2025/12/22 19:31
From version 35.1
edited by Isaac Mejia
on 2025/12/15 18:27
on 2025/12/15 18:27
Change comment:
There is no comment for this version
To version 36.1
edited by Isaac Mejia
on 2025/12/22 19:30
on 2025/12/22 19:30
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -82,19 +82,22 @@ 82 82 #set ($desc = "Articles and guides for $label.")## 83 83 #end## 84 84 85 - ## Article space: Main.<PageName with spaces replaced by underscores> 86 - #set ($articleSpace = "Main." + $pageName.replace(" ", "_"))## 85 + ## Article spaces (support both naming conventions) 86 + #set ($spaceA = "Main." + $pageName)## 87 + #set ($spaceB = "Main." + $pageName.replace(" ", "_"))## 87 87 88 - ## Count non-hidden, non-WebHome pages in th atarticle space89 + ## Count non-hidden, non-WebHome pages in either article space 89 89 #set ($articleCount = 0)## 90 90 #set ($countXwql = 91 91 "select count(doc.fullName) " + 92 92 "from XWikiDocument doc " + 93 - "where doc.space =:space " +94 + "where doc.space in (:spaceA, :spaceB) " + 94 94 "and doc.name <> 'WebHome' " + 95 95 "and doc.hidden <> true" 96 96 )## 97 - #set ($countQuery = $services.query.xwql($countXwql).bindValue("space", $articleSpace))## 98 + #set ($countQuery = $services.query.xwql($countXwql))## 99 + #set ($discard = $countQuery.bindValue("spaceA", $spaceA))## 100 + #set ($discard = $countQuery.bindValue("spaceB", $spaceB))## 98 98 #set ($resultList = $countQuery.execute())## 99 99 #if ($resultList && $resultList.size() > 0)## 100 100 #set ($articleCount = $resultList.get(0))##