METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%"
> title="This topic used to exist and was moved to: "}%
## How Rename/Move Works
1. %SEARCH%, with a special template, finds and displays all occurrences of the topic name in other topics, site-wide. These referring links are by default automatically changed to the new topic and/or web name. This includes relevant [[TWikiMetaData]] definitions.
- User can omit one or more topics from the update list by unchecking them.
- `` and `` are honoured - no changes are made to text within these areas.
2. The topic is moved (if locks allow).
3. References are changed (locks and permissions permitting).
4. Any referring topics that can't be changed due to locks are listed - user can take note and change them at another time.
### How Referring Topics Are Found
First, matching topics in the current web are listed - matches are to **topic**
. Next, all webs (including the current one) are listed that match **web.topic**
. _All_ webs will be searched during rename, even if `NOSEARCHALL` is defined on a web, though access permissions will of course be honoured.
Changed references are kept are as short as possible, ex: `topic` is used in preference to `web.topic`.
### Effect of User Access Settings
User permissions affect the Rename function in various ways. To rename a topic, you need both **ALLOWTOPICVIEW**
and **ALLOWTOPICCHANGE**
permission for that topic. To alter referring topics, you need change permission. See [[TWikiAccessControl]] for information on setting up access permissions.
## Special Considerations
Consider carefully whether to make browser-based **Rename/Move/Delete** widely available, or to restrict it to an administrator/moderator group. Allowing all users to easily manipulate topics can be extremely useful in refactoring a busy web or site. However, there are at least two significant potential drawbacks to take into account:
- When referring links are updated, the modified topics appear in [[WebChanges]], creating the impression that editorial changes were made. This can undermine the usefulness of [[WebChanges]].
- Due to [[current limitations|Main/WebHome#RenameLimitations]], fairly heavy use of Rename/Move/Delete functions can lead to an accumulation of minor technical problems (ex: broken links) and usability issues (ex: user confusion). If Rename... is used heavily, these negatives will obviously increase, in number and effect.
Ultimately, the size, objectives, and policies of your TWiki site, the real-world behavior of your user group, and most importantly, the initial TWiki site management leadership, will determine the most effective implementation of this feature, and the success of the site overall.
## Known Issues
**Rename/Move** is fairly complicated due to the dynamic generation of links. Ideally, it would be possible to run the required part of rendering in a way that would allow identification of the text to be changed. Unfortunately, these hooks don't exist in TWiki at present. Instead, %SEARCH% is used with a special template to show the text to be changed, and the selected topics are then altered. One drawback is that `search` can show matches that will not be updated due to case differences. Other mismatches with actual rendered output are also possible as the approaches are so different.
The following shows some limitations of square bracket processing.
> [[Old Topic]] => [[NewTopic][Old Topic]]
> [[old topic]] => [[NewTopic][old topic]]
> [[old t opic]] => not changed
> [[OldTopic]] => [[NewTopic]]
**_Related Topics:_** [[UserDocumentationCategory]], [[AdminDocumentationCategory]]