%META:TOPICINFO{author="TWikiContributor" date="1111929255" format="1.0" version="27"}%
%TOC%
%STARTINCLUDE%
---# Managing Webs

_Adding webs is a web based operation; renaming and deleting webs are manual operations done directly on the server_

---++ Overview

A TWikiSite is divided into webs; each one represents one subject, one area of collaboration. Administrators can add/rename/delete webs.

TODO: what sort of group / privelidges are needed for the operations here?

#WebTemplate
---++ Choose Web Template

There are two methods used to create a new web.  First you can use a specially designed TemplateWeb.  This is an invisible web that begins with an underscore &quot;_&quot; character (for example =_default=).  All topics in the template web will be copied into your new web.

The second method is to use an existing web as a template web.  This may be useful if you already have a web that you like to use as a starting point.  Only topics that have names beginning with *Web...* (like "%HOMETOPIC%", "%NOTIFYTOPIC%", etc.) are copied.

In either case you will want to be sure to verify that your new web has all the custom modifications that you desire.

#CreateNewWeb
---++ Adding a New Web

<form name="admin" action="%SCRIPTURLPATH%/manage%SCRIPTSUFFIX%/%INTURLENCODE{"%WEB%/%TOPIC%"}%" method="post">
Create a new web by filling out this form. __Note:__ It is not recommended to create a new web for each little project. You can organize content within a web using TWikiForms and FormattedSearch. Cross-linking topics and search is easier if there are only a few larger webs.
|  *Name of new web:* | <input name="newweb" type="text" value="%URLPARAM{"newweb"}%" size="16" /> | The name must start with an upper case letter, followed by upper or lower case letters or numbers |
|  *Based on web:* | <select name="baseweb"> %WEBLIST{ "<option>$name</option>" webs="webtemplate,public" selection="_default" separator=" "}% </select> | Select a TemplateWeb |
|  *Web color:* | <input name="webbgcolor" type="text" value="#D0D0D0" size="16" /> | Enter a StandardColors code for the web |
|  *Description:<br /> &nbsp;<br /> &nbsp;* | <input type="text" name="sitemapwhat" value="" size="60" /><br /> Enter a short description of the web. Write =Web.TopicName= instead of just =TopicName= if you include links. This will list the web in the %TWIKIWEB%.SiteMap (leave field empty if you prefer not to update the directory.) ||
|  *Use to...<br /> &nbsp;* | <input type="text" name="sitemapuseto" value="...collaborate on" size="60" /><br /> Continue the sentence describing the intended use. This is also for the %TWIKIWEB%.SiteMap ||
|  *Exclude web from "search all":* | <input type="radio" name="nosearchall" value="" checked="checked" /> No &nbsp; <input type="radio" name="nosearchall" value="on" /> Yes | Specify if you want to exclude the web from a "search all webs" search. Note that the %TWIKIWEB%.SiteMap will not list the web if you select Yes. |
| | <input type="submit" value="Create new web" /> ||
<input name="newtopic" type="hidden" value="%URLPARAM{"newtopic"}%" />
<input name="action" type="hidden" value="createweb" />
</form>

__Notes:__
	* Attachments will NOT get copied over along with their topics
	* While creating the new web TWiki will update the following variables in the WebPreferences: =WEBBGCOLOR=, =SITEMAPLIST=, =SITEMAPWHAT=, =SITEMAPUSETO= and =NOSEARCHALL=.  These variables are used to dynamically generate the SiteMap
	* TWiki does not edit the [[%TWIKIWEB%.TWikiPreferences]] file to update the =WIKIWEBLIST=.  This must be done by hand

---++ Renaming or Deleting a Web

Rename a web via the Tools section in each web's WebPreferences topic.  You may delete a web by moving it into a Trash web.  

---+++ Permissions

You may only rename a web if you have permissions to rename all the topics within that web, including any topics in that web's subwebs.  You will also need permissions to update any topics containing references to that web.

---+++ Edit Conflicts

If anyone is editing a topic which requires updating, or which lives in the web being renamed, a second confirmation screen will come up which will indicate which topics are still locked for edit.  You may continue to hit the refresh button until an edit lease is obtained for each topic which requires updating (the "Refresh" button will change to "Submit"), or hit "Cancel", which will cancel your edit lease on all affected topics.

---+++ Renaming the webs in the distribution

If you plan to rename the %MAINWEB% web, remember that TWiki stores user and group topics in =%<nop>MAINWEB%=, which by default is =Main= (this is assigned in the site configuration). That means that every WikiName signature - =Main.<nop>SomeUserName= - points to it and would need updating (unless the variable, =%<nop>MAINWEB%.<nop>SomeUserName=, is used throughout).  This potentially large change can be performed automatically with the renameweb function mentioned above, in the [[%MAINWEB%.WebPreferences]] topic.

If you want to rename the TWiki web, remember it is referred to by =%<nop>TWIKIWEB%= which is also defined by a configuration setting.

---++ Hierarchical Webs

Hierarchical web support is enabled by turning on the =EnableHierarchicalWebs= setting in =configure=. Without this setting, TWiki will only allow a single level of hierarchy (webs). If you set this, you can use multiple levels, like a directory tree, i.e. webs within webs.

You can create hierarchical webs via the _Adding a New Web_ form above, by using a slash- or dot-separated path name which is based on an existing web name in the _Name of new web:_ field.

*Example:*

To create a subweb named =Bar= inside a web named =Foo=, use =Foo/Bar= or =Foo.Bar= as the new web name in the form above.

---+++ Subweb Preferences are Inherited

The preferences of a subweb are inherited from the parent web and overridden locally.  Preferences are ultimately inherited from the [[%TWIKIWEB%.TWikiPreferences]] topic.

*Example Preference Inheritance for =Sandbox/TestWeb/SubWeb.SubWebTopic= topic:*

	1. =%TWIKIWEB%.TWikiPreferences= site-wide preferences
	2. =Sandbox.WebPreferences= inherits from and overrides settings in =%TWIKIWEB%.TWikiPreferences=
	3. =Sandbox/TestWeb.WebPreferences= inherits from and overrides settings in =Sandbox.WebPreferences=
	4. =Sandbox/TestWeb/SubWeb.WebPreferences= inherits from and overrides settings in =Sandbox/TestWeb.WebPreferences= 
	5. =Sandbox/TestWeb/SubWeb.SubWebTopic= inherits from and overrides settings in =Sandbox/TestWeb/SubWeb.WebPreferences= 

---+++ Navigation

The Pattern skin (default) indicates Subwebs by indententing them in the sidebar relative to their level in the hierarchy.


__Related Topics:__ AdminDocumentationCategory, AdminToolsCategory
<!-- Do _not_ attempt to edit this topic; it is auto-generated. Please add comments/questions/remarks to the Dev topic instead. -->
