|
PageRename<< | Cookbook-V1.HomePage | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook. GoalGive authors a way to change the name of a page. SolutionProvide a rename action that makes a copy of the current page with a new name and redirects links from the old page to the new page. Existing references to the old name continue to work -- they just get redirected. FilesInstallationPut rename.php in the local/ directory and add the following line to local/local.php: include_once("local/rename.php");
ConfigurationOn a page that you want to rename, add ?action=rename to the url in the address box and press Return. This takes you to a new view of the page that prompts you for a new name. Enter the new name and press Rename. The script applies title case to the string you entered, turns any spaces into the space replace character, checks to see whether the new name is a valid title and that it doesn't already exist. If all is well, you will see the new page name, with a redirected from ... message. Depending on how you have configured PmWiki/PmWiki, you may not see the redirected message. The script currently allows you to change the title only, not the group. See AlsoDevelopment.PageRename. History17 November 2003: released Comments, BugsIn a concatenation here the fix: loop through concatention, use oldpagefile ##-----
foreach (
Contributors
|