Skip to content
Snippets Groups Projects
Commit dcbc61de authored by Marius Dumitru Florea's avatar Marius Dumitru Florea
Browse files

XWIKI-12909: openTo doesn't work when root is specified as relative reference

* Request the tree JSON through the current document so that relative references are correctly resolved.
parent eabba979
No related branches found
No related tags found
No related merge requests found
......@@ -38,14 +38,17 @@
#if ($showChildDocuments == 'true')
#set ($macro.options.hierarchyMode = 'parentchild')
#end
#set ($resourceParams = {'outputSyntax': 'plain'})
#set ($resourceParams = {
'outputSyntax': 'plain',
'sheet': 'XWiki.DocumentTree'
})
#foreach ($entry in $docTreeConfig.entrySet())
#set ($value = $macro.options.get($entry.key))
#if ("$!value" != '' && $value != "$!entry.value")
#set ($discard = $resourceParams.put($entry.key, $value))
#end
#end
#set ($macro.options.reference = "path:$xwiki.getURL('XWiki.DocumentTree', 'get', $escapetool.url($resourceParams))")
#set ($macro.options.reference = "path:$doc.getURL('get', $escapetool.url($resourceParams))")
#set ($editable = $macro.options.remove('readOnly') != 'true')
#set ($macro.options.dragAndDrop = $editable)
#set ($macro.options.contextMenu = $editable)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment