There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-1f7b9456-7ba5-427c-824c-c1cb44658e67 XWIKI-20528 Open

Add parameter to open nodes of DocumentTree to given level/depth

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-c518bf44-af5e-404b-8144-4f6d111404b7 Marius Dumitru Florea on 25/Jun/24 08:50
 

This shouldn't be hard to implement. The JSON used to get the child nodes of an expanded node (or the root node) can include descendants, i.e. for each direct child node we can include its children, and for those children we can include their children, and so on. No change require on the client side (jstree deals directly with this JSON). Normally the only changes required are to:

  • add the new macro parameter
  • use it in XWiki.DocumentTreeMacros, which generates the JSON; to be precise here, instead of returning a boolean to indicate if the node has children, we can return the actual child nodes (JSON).