Changes for page 3D Printing
Last modified by Josh McGee on 2026/01/21 13:23
From version 56.1
edited by Josh McGee
on 2025/11/19 10:53
on 2025/11/19 10:53
Change comment:
There is no comment for this version
To version 53.1
edited by Josh McGee
on 2025/11/19 10:52
on 2025/11/19 10:52
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -20,25 +20,32 @@ 20 20 ## Current wiki name 21 21 #set($wikiName = $xcontext.database) 22 22 23 - ## Build a document reference for Areas.Upstairs."3D Printers".WebHome 23 + ## Build a document reference for Areas.Upstairs."3D Printers" 24 + ## (nested page, NOT WebHome of another space) 24 24 #set($parentRef = $services.model.createDocumentReference( 25 25 $wikiName, 26 - ['Areas', 'Upstairs', '3D Printers'] 27 + ['Areas', 'Upstairs', '3D%20Printing'], 28 + 'WebHome' 27 27 )) 28 28 29 29 ## Get the parent document 30 30 #set($parentDoc = $xwiki.getDocument($parentRef)) 31 31 32 - ## Get its direct children 33 - #set($children = $parentDoc.getChildren()) 34 - 35 - #if(!$children || $children.isEmpty()) 36 - No subpages found under [[Areas.Upstairs.3D Printers]]. 34 + ## Optional sanity check: ensure the parent exists 35 + #if(!$parentDoc.exists()) 36 + Parent page not found: $parentRef 37 37 #else 38 - #foreach($childRef in $children) 39 - ## Resolve each child reference to a document 40 - #set($childDoc = $xwiki.getDocument($childRef)) 41 - * [[$childDoc.getDisplayTitle()>>$childDoc]] 38 + ## Get its direct children 39 + #set($children = $parentDoc.getChildren()) 40 + 41 + #if(!$children || $children.isEmpty()) 42 + No subpages found under 3D Printers. 43 + #else 44 + #foreach($childRef in $children) 45 + ## Resolve each child reference to a document 46 + #set($childDoc = $xwiki.getDocument($childRef)) 47 + * [[$childDoc.getDisplayTitle()>>$childDoc]] 48 + #end 42 42 #end 43 43 #end 44 44 #end ... ... @@ -48,3 +48,4 @@ 48 48 {{/velocity}} 49 49 50 50 58 +