7a33bc1c0823850ef7cad03da2f1c49102e54aaf
[openafs-wiki.git] / TWiki / ManagingTopics.mdwn
1 <div>
2   <ul>
3     <li><a href="#Managing Topics"> Managing Topics</a><ul>
4         <li><a href="#Overview"> Overview</a></li>
5         <li><a href="#How to Rename/Move/Delete a Topi"> How to Rename/Move/Delete a Topic</a><ul>
6             <li><a href="#Referring Topics"> Referring Topics</a></li>
7             <li><a href="#About Deleting a Topic"> About Deleting a Topic</a></li>
8           </ul>
9         </li>
10         <li><a href="#Clearing the Trash"> Clearing the Trash</a></li>
11         <li><a href="#Redirecting from an Old Topic"> Redirecting from an Old Topic</a></li>
12         <li><a href="#Effect of Access Settings"> Effect of Access Settings</a></li>
13         <li><a href="#How Rename/move Works"> How Rename/move Works</a></li>
14         <li><a href="#Known Limitations"> Known Limitations</a></li>
15       </ul>
16     </li>
17   </ul>
18 </div>
19
20 # <a name="Managing Topics"></a> Managing Topics
21
22 _Browser-based rename, move, and delete for individual topics_
23
24 ## <a name="Overview"></a> Overview
25
26 Use browser controls while viewing a topic, to change its name, move it to another TWiki web, or delete it to a hidden `Trash` web.
27
28 ## <a name="How to Rename/Move/Delete a Topi"></a> How to Rename/Move/Delete a Topic
29
30 1. **Click** on <code>**[More]**</code> (bottom right of page) on the topic to be changed, then, in the new screen, on <code>**[Rename/move]**</code>.
31 2. **Select** target web if other than the current web - chose `Trash` to [[delete a topic|Main/WebHome#DeleteTopic]]
32 3. **Enter** the new topic name - default is current name <br />**_NOTE:_** You will be warned if there are locks or if there is a name conflict.
33 4. **Select** from the list of referring links any topics NOT to be updated with the new name (by default, all referring links will be updated).
34 5. **Click** on <code>**[Rename/Move]**</code>: the topic will be renamed and links to the topic updated as requested.
35   - If any of the referring pages are locked then they will be listed.
36   - You can correct these later by again pressing <code>**[Rename/Move]**</code>.
37
38 ### <a name="Referring Topics"></a> Referring Topics
39
40 Referring topics are found using the the %SEARCH% variable, see the template `searchrenameview.tmpl`. 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_. Because %SEARCH% is used, Webs marked in [[WebPreferences]] as NOSEARCHALL will not show up in the search for refernces to the _topic_ being changed.
41
42 Changed references are kept are as short as possible, ex: _topic_ is used in preference to _web.topic_.
43
44 <a name="DeleteTopic"></a>
45
46 ### <a name="About Deleting a Topic"></a> About Deleting a Topic
47
48 Deleted topics are moved to the `Trash` web - NOT physically erased from the server. All webs share `Trash` - in case of a name conflict with a topic already `Trash`, the user is alerted and asked to choose a new name.
49
50 ## <a name="Clearing the Trash"></a> Clearing the Trash
51
52 The `Trash` web should be be cleared periodically, by archiving the contents if required (recommended), then deleting the files from the `Trash` directory.
53
54 ## <a name="Redirecting from an Old Topic"></a> Redirecting from an Old Topic
55
56 You can use [[TWikiMetaData]] to place a command in [[WebTopicViewTemplate]] and [[WebTopicNonWikiTemplate]] that will show if a topic has moved by searching for the tag %META:TOPICMOVED\{...\}%. Customize something like this:
57
58 > %<nop>METASEARCH{type="topicmoved" web="%WEB%" topic="%TOPIC%"
59 >     title="This topic used to exist and was moved to: "}%
60
61 ## <a name="Effect of Access Settings"></a> Effect of Access Settings
62
63 Permissions affect the rename function in various ways. To rename a topic, you need both change and rename permissions. To alter referring topics, you need change permission. See [[TWikiAccessControl]] for information on setting up access permissions.
64
65 ## <a name="How Rename/move Works"></a> How Rename/move Works
66
67 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.
68   - User can omit one or more topics from the update list.
69   - `<pre>` and `<verbatim>` are honoured - no changes are made to text within these areas.
70 2. The topic is moved (if locks allow).
71 3. References are changed (locks and permissions permitting).
72 4. Any referring topics that can't be changed due to locks are listed - user can change them at another time.
73
74 ## <a name="Known Limitations"></a> Known Limitations
75
76 **Rename/move** in 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 because of case differences. Other mismatches to actual rendered output are also possible as the approaches are so different.
77
78 The following shows some limitations of square bracket processing.
79
80 > [[Old Topic]]  => [[NewTopic][Old Topic]]
81 >     [[old topic]]  => [[NewTopic][old topic]]
82 >     [[old t opic]] => not changed
83 >     [[OldTopic]]   => [[NewTopic]]
84
85 -- [[MikeMannix]] - 15 Sep 2001 <br />