Include child pages

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Include child pages

Eugen Colesnicov
Hello!
Please help me for a xwiki syntax. I need to include in document child pages of this document, but not all level-childs, only directly-connected to my document child pages.

For finding attachments of a child pages, I already learned. I should use:
#foreach($attDoc in $xwiki.wrapDocs($xwiki.searchDocuments(", XWikiAttachment att where att.docId =
doc.id and doc.web='${doc.space}'")))
   #foreach($att in $attDoc.getAttachmentList())
     * ${att.filename}(${attDoc.displayTitle})
   #end
#end
but I need also to find child pages.
Thanks beforehand!
Reply | Threaded
Open this post in threaded view
|

Re: Include child pages

Tronicek
This post has NOT been accepted by the mailing list yet.
To find all child pages (pages having this page as parent) you need something like:

#foreach($childDocName in $xwiki.searchDocuments("where doc.parent=’$doc’ order by doc.creationDate"))
* [$childDocName] ($childDocName)
#end

etvc wrote
Hello!
Please help me for a xwiki syntax. I need to include in document child pages of this document, but not all level-childs, only directly-connected to my document child pages.

For finding attachments of a child pages, I already learned. I should use:
#foreach($attDoc in $xwiki.wrapDocs($xwiki.searchDocuments(", XWikiAttachment att where att.docId =
doc.id and doc.web='${doc.space}'")))
   #foreach($att in $attDoc.getAttachmentList())
     * ${att.filename}(${attDoc.displayTitle})
   #end
#end
but I need also to find child pages.
Thanks beforehand!