Hi all, I want to copy a complete document's sub tree under another space or sub tree ... how can I do it? Thanks Raffo
Hi, If by "document's sub-tree" you mean space containing documents you will have to do that in Velocity I think using a combination of $xwiki.searchDocuments("where doc.space='SpaceName'") and $xwiki.copyDocument("SpaceName.DocName", "NewSpace.NewDocName"). 2008/1/21, Raffaele Viola <[email protected]>:
Hi all,
I want to copy a complete document's sub tree under another space or sub tree ... how can I do it?
Thanks Raffo
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
2008/1/21, Thomas Mortagne <[email protected]>:
Hi,
If by "document's sub-tree" you mean space containing documents you will have to do that in Velocity I think using a combination of $xwiki.searchDocuments("where doc.space='SpaceName'") and
doc.web not doc.space
$xwiki.copyDocument("SpaceName.DocName", "NewSpace.NewDocName").
2008/1/21, Raffaele Viola <[email protected]>:
Hi all,
I want to copy a complete document's sub tree under another space or sub tree ... how can I do it?
Thanks Raffo
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
-- Thomas Mortagne
On Jan 21, 2008, at 11:43 AM, Raffaele Viola wrote:
Hi all,
I want to copy a complete document's sub tree under another space or sub tree ... how can I do it?
Using a velocity script. Algo: 1) get current document 2) get children of current doc (either with API or with a search - I don't remember if we have a get children API) 3) for each children doc, copy it to the new location You could have a look at the copy document page in your wiki: http://<server>/xwiki/bin/edit/XWiki/CopyDocument?editor=wiki Thanks -Vincent
participants (3)
-
Raffaele Viola -
Thomas Mortagne -
Vincent Massol