Changes for page Home
Last modified by Isaac Mejia on 2025/12/15 18:27
From version 9.1
edited by Isaac Mejia
on 2025/12/05 16:52
on 2025/12/05 16:52
Change comment:
There is no comment for this version
To version 10.1
edited by Isaac Mejia
on 2025/12/05 16:57
on 2025/12/05 16:57
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4,14 +4,16 @@ 4 4 ## ------------------------------------------------------------ 5 5 ## 1) Discover category pages automatically 6 6 ## - Category pages live at: Main.<CategoryLabel>.WebHome 7 -## - We query all docs in space=Main except WebHome + KB-Categories 7 +## - We query all docs in space=Main except: 8 +## - WebHome 9 +## - KB-Categories (index page) 10 +## - KBStyles (internal style doc, not a category) 8 8 ## ------------------------------------------------------------ 9 9 #set ($xwql = 10 10 "select doc.fullName, doc.title " + 11 11 "from XWikiDocument doc " + 12 12 "where doc.space = :space " + 13 - "and doc.name <> 'WebHome' " + 14 - "and doc.name <> 'KB-Categories' " + 16 + "and doc.name not in ('WebHome','KB-Categories','KBStyles') " + 15 15 "and doc.hidden <> true " + 16 16 "order by lower(doc.title)" 17 17 ) ... ... @@ -19,18 +19,14 @@ 19 19 #set ($query = $services.query.xwql($xwql).bindValue("space", "Main")) 20 20 #set ($rows = $query.execute()) 21 21 22 -## Build a list of document objects for convenience 23 23 #set ($categories = []) 24 24 #foreach ($row in $rows) 25 - #set ($fullName = $row[0]) ## e.g. "Main.Member Management"26 + #set ($fullName = $row[0]) 26 26 #set ($catDoc = $xwiki.getDocument($fullName)) 27 27 #set ($discard = $categories.add($catDoc)) 28 28 #end 29 29 30 -## ------------------------------------------------------------ 31 -## 2) Optional: description overrides by category label 32 -## Keys must match the *display title* (e.g. "Member Management") 33 -## ------------------------------------------------------------ 31 +## Optional description overrides (rest of your code stays the same) 34 34 #set ($categoryDescriptions = { 35 35 "Member Management": "How to manage members, families, and profiles.", 36 36 "Configuration": "Set up locations, billing, and core system settings.",