Edgewall Software
Home
Trac
Trac Hacks
Genshi
Babel
Bitten
Home
Download
Documentation
Mailing Lists
License
FAQ
Search:
Login
Preferences
Help/Guide
About Trac
Wiki
Timeline
Roadmap
Browse Source
View Tickets
New Ticket
Search
Context Navigation
+0
Start Page
Index
History
Editing WikiRename
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
= Wiki Rename = There's now a development branch for adding a page rename operation to the TracWiki, in [source:/sandbox/wiki-rename]. Among the various possibilities for performing a rename, this implementation aims at simplicity. The page name is modified "in-place", i.e. the object identity is mutated and as such, the whole history is kept and becomes associated to the renamed wiki page. - Status: initial version, should work reasonably well. - View the changes: log:sandbox/wiki-rename - Test the branch, e.g.: {{{ % svn co http://svn.edgewall.org/repos/trac/sandbox/wiki-rename % cd wiki-rename % python setup.py develop % python trac/web/standalone.py -p 8000 <your-test-environment> }}} You need to be a `WIKI_ADMIN` in order to be able to rename a page (or at the very least, have the new `WIKI_RENAME` permission). == How it works == '''Example:''' renaming !WikiStart to !ProjectHome - before the rename: || ''pagename'' || ''text'' || ''comment'' || || !WikiStart || version1 || comment1 || || !WikiStart || version2 || comment2 || || !WikiStart || version3 || comment3 || - after the rename: || ''pagename'' || ''text'' || ''comment'' || || !ProjectHome || version1 || comment1 || || !ProjectHome || version2 || comment2 || || !ProjectHome || version3 || comment3 || the !WikiStart page will be (optionally) recreated with a redirection to the new page: || ''pagename'' || ''text'' || ''comment'' || || !WikiStart || See !ProjectHome ||Renamed !WikiStart to !ProjectHome || == Overview of the changes == - added new `WikiPage.rename` and `Attachment.reparent_all` methods - added new `wiki_rename.html` template and the corresponding handler methods, `WikiModule._render_confirm_rename` and `WikiModule._do_rename` methods == Discussion == Feel free to provide feedback. * Would be nice to have a [http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.2 HTTP 301 redirect] from the old wiki page to the new one, to keep searchengine rankings etc. - Right, real redirect is on the TODO list (#976) * Another TODO: optionally rename sub-pages as well, and more generally, have the possibility to do batch renames * Another TODO: would be nice to have an entry in the history of the page including the name, date and optional comment of the rename event. ---- See also: #1106, TracDev/Proposals/AdvancedWikiOperations
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.