Failed to execute the [velocity] macro. Cause: [The execution of the [velocity] script macro is not allowed in [snippets:Licenses.Code.MissingLicensesUIX]. Check the rights of its last author or the parameters if it's rendered from another script.]. Click on this message for details.
page_whiteLists immediate children of the current page
TypeSnippet
Category
Developed by

Karthikeyan Marudhachalam

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

Displays all the immediate children of the current page. This could be used to create a panel for easy navigation on the right column in the page layout.

Code

{{velocity}}
#panelheader($msg.get("core.viewers.information.children"))
#set($query="where doc.parent='${doc.web}.${doc.name}'")
#set($results = false)
#set($results = $xwiki.searchDocuments($query, 10, 0))
#set($first = true)
#foreach($docname in $results)
#set($rdoc = $xwiki.getDocument($docname).getTranslatedDocument())
[[$rdoc.getDisplayTitle()>>$rdoc.fullName]]
#end
#panelfooter()
{{/velocity}}

Prerequisites & Installation Instructions

  • Create a new Panel in Panels space
  • Paste the above code in the content section.
  • Go to "Administer Wiki" page. Open "Page Elements" section.
  • Add this panel to right/left column by dragging that into the required location.
     

Get Connected