Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

Move a Page or rename it

Summary: How to move a page (obsolete, see RenamePage)
Category: Obsolete

This recipe is obsolete, see RenamePage

Question

is there a simple way to move MyWikiPage (and any subpages) into MyNewGroup without having to edit every page?

Answer

A quick hack would be to make a copy manually in wiki.d of all the files you want to move, then rename each of them to the new name.

Then, to deal with any broken references, you'd edit each of the old pages and replace its contents

But it may also be worth to write a handler for ?action=move (if there's none already out there)
In order to do that, though we may need to discuss the functionality required.

  • move page
  • sift through each file in wiki.d and replace oldName with newName.
  • repeat for all subpages (defined as...)

Notes and Comments

What would you consider a subpage? How would a script know a given page is a subpage of another? -Radu

A subpage would be any page that it is in the parent's namespace. The cookbook part of Move a Page or rename it? {{{ Move a Page or rename it? }}}

See Also

WikiShExamples#RenamePage or WikiShExamples#RenameGroup provides a way to handle both the renaming of the page and the fixing of links to the renamed page. Unfortunately I'm a little unclear on "the parent's namespace" but I'm pretty sure that is *not* addressed in these solutions (although it could be trivially added). Note also that non-qualified links on a single-page rename are not fixed.

Contributors

-Radu

Edit - History - Print - Recent Changes - Search
Page last modified on June 25, 2008, at 11:47 AM