[xwiki-users] Moving a page and its hierarchy
I have a page hierarchy of the following form: + Parent1----- Child1----- Child2----- Child2 Where one parent page has three children pages. I would like to move this entire hierarchy rooted at Parent1 to another space. If I rename Parent1, then only Parent1 gets moved to the new space, and not its children. Is there a way to move the entire hierarchy of pages (parent page and all its child pages) to another space?
Hi, There is no UI for this operation because there is no rule that implies that all the children of a page are in the same space. This is just something specific to your usecase. However, you can easily use XWiki`s powerful scripting API [1] to achieve what you want. Specially have a look at the $doc.getChildren() and $doc.rename(...) methods. Thanks, Eduard ---------- [1] http://platform.xwiki.org/xwiki/bin/view/DevGuide/Scripting On Fri, Mar 6, 2015 at 2:06 AM, Debajit Adhikary <[email protected]> wrote:
I have a page hierarchy of the following form: + Parent1----- Child1----- Child2----- Child2 Where one parent page has three children pages. I would like to move this entire hierarchy rooted at Parent1 to another space. If I rename Parent1, then only Parent1 gets moved to the new space, and not its children. Is there a way to move the entire hierarchy of pages (parent page and all its child pages) to another space?
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
participants (2)
-
Debajit Adhikary -
Eduard Moraru