%META:TOPICINFO{author="ProjectContributor" date="1696002963" format="1.1" version="1"}%
%META:TOPICPARENT{name="UserDocumentationCategory"}%
%STARTINCLUDE%
---+ Managing Webs
Browser-based rename, move, copy, and delete for individual webs

%TOC%

%ADDTOZONE{"head" text="<style type='text/css'>
    #createWeb .col1 {float:left; width:30%; margin:0 3% 0 0;}
    #createWeb .col2 {float:left; width:66%;}
    #createWeb .col1 .foswikiInputField,
    #createWeb .col1 .foswikiSelect {width:90%;}
    #createWeb .required {font-size:80%; color:#aaa;}
    #createWeb .foswikiHelp {margin:.5em 0;}
    #createWeb .additionalSettings {margin:.5em -10px;}
    #createWeb .additionalSettings .foswikiActionFormStepSign {display:none;}
    #createWeb .additionalSettings .foswikiFormStep {padding:5px 10px;}
</style>"}%
<!-- %JQREQUIRE{"popupwindow"}% -->

---++ What are Webs?
A Foswiki site is divided into "Webs", or groups or topics - each one represents one subject, one area of collaboration. Administrators can add, rename or delete webs.%BR%
At file level, a Web is a directory located inside the =data= directory, with text files as topics. %BR%
A number of Webs are fixed: =%SYSTEMWEB%= for documentation, =%USERSWEB%= to store user pages, =%HOMEWEB%= for site-wide preferences, =%TRASHWEB%= for the topic recycle bin. %BR%
Other webs can be created as needed.

%TWISTY{
  link="%JQICON{"application_cascade"}% List all Webs"
  mode="div"
}%
<div class="foswikiHelp">
*Public%IF{"$USERNAME ingroup 'AdminGroup'" then=" and hidden"}% webs:*
%WEBLIST{"[[$name.%HOMETOPIC%][$name]]" separator=", "}%

*Template webs:*
%WEBLIST{format="[[$name.%WEBPREFSTOPIC%][$name]]" webs="webtemplate" separator=", "}%
</div>
%ENDTWISTY{}%

#CreateNewWeb
---++ Create a new web
To use this form you must be administrator.

Before you begin: consider that less webs are better than more webs. Cross-linking topics is easier, and searches are faster, if there are only a few larger webs.

<noautolink>
<form name="admin" action="%SCRIPTURLPATH{manage}%/%WEB%/%TOPIC%" method="post">
	<div id="createWeb" class="foswikiFormSteps">
		<input name="newtopic" type="hidden" value="%URLPARAM{"newtopic"}%" /> <input name="action" type="hidden" value="createweb" />
		<div class="foswikiFormStep">
			<h3>Name of the new web <span class="required">Required</span></h3>
			<div class="col1">
				<p>
					<input name="newweb" class="foswikiInputField" type="text" value="%URLPARAM{"newweb"}%" size="40" />
				</p>
			</div><!--//col1-->
			<div class="col2">
				<p>
					Naming rule: the name must start with an upper case letter, followed by upper or lower case letters or numbers. Examples: =Learn=, =<nop>SupDocs=, =KNow3=.  It is recommended to use Web names that are _not_ autolinking as WikiWords.
                    See [[TopicsAndWebs]] for more information about naming webs, and disambiguation when a Web contains a topic of the same name.
				</p>
				<p>
					If you are creating a sub-web (a web inside a web), use the notation =Existingweb.Newweb=.
				</p>
				%TWISTYBUTTON{id="infoOnSubWebs" mode="span" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%" showlink="More info about sub-webs ..." hidelink="Close info" remember="on"}%
				%TWISTYTOGGLE{id="infoOnSubWebs"}%<div class="foswikiHelp">
					<h4>About sub-webs</h4>
					<p>
						You can only create (Hierarchical) sub-webs if the ={EnableHierarchicalWebs}= _expert_ setting under the
						[[%SCRIPTURLPATH{"configure"}%][configure -> =Store= Tab]] is enabled.
						%IF{
							"{EnableHierarchicalWebs}"
							then="%GREEN% sub-webs are currently enabled (default) %ENDCOLOR%."
							else="%RED% sub-webs are currently disabled %ENDCOLOR%. Without this setting, Foswiki will only allow a single level of webs. With it, you can use multiple levels, like a directory tree, i.e. webs within webs."
						}%
					</p>
					<p>
						You might not need sub-webs. Foswiki topics already have a parent/child relationship within a web,
						which is shown in the breadcrumb. Try to keep the number of webs to a minimum in order to keep search and
						cross-referencing simple.
					</p>
				</div>%ENDTWISTYTOGGLE%
			</div><!--//col2-->
			<div class="foswikiClear"></div>
		</div><!--//foswikiFormStep-->
		<div class="foswikiFormStep">
			<h3>Summary</h3>
			<div class="col1">
				<p>
					<input type="text" class="foswikiInputField" name="WEBSUMMARY" value="" size="40" />
				</p>
			</div><!--//col1-->
			<div class="col2">
				<p>
					Enter a short description of the web. This description will be used in the [[%SYSTEMWEB%.SiteMap][SiteMap]]. If you are using links: write =Web.TopicName= instead of just =TopicName= for correct linking.
				</p>
			</div><!--//col2-->
			<div class="foswikiClear"></div>
		</div><!--//foswikiFormStep-->
		<div class="foswikiFormStep">
            <h3>Additional Settings</h3>Leave these settings as default if you do not understand what they mean.
			<div class="additionalSettings">
				<div class="foswikiFormSteps">
					<div class="foswikiFormStep">
						<h3>Template web</h3>
						<div class="col1">
							<p>
								<select name="baseweb" class="foswikiSelect"> %WEBLIST{ "<option $marker>$name</option>" webs="webtemplate,public" selection="_default" separator=" "}%</select>
							</p>
						</div><!--//col1-->
						<div class="col2">
							<p>
								Base the new web on an existing web.
							</p>
							%TWISTYBUTTON{id="infoOnTemplates" mode="span" showimgleft="%ICONURLPATH{toggleopen}%" hideimgleft="%ICONURLPATH{toggleclose}%"  showlink="More info about template webs ..." hidelink="Close info" remember="on"}%
							%TWISTYTOGGLE{id="infoOnTemplates"}%<div class="foswikiHelp">
							<h4>About template webs</h4>
							<p>
								There are two methods used to create a new web. %BR% 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. %BR%
								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 would like to use as a starting point.* Only topics that have names beginning with "Web..." (like "%HOMETOPIC%" or "WebNotify") 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. <!-- Any [[macros]] defined in the form below will automatically be set in the <nop>%WEBPREFSTOPIC% of the new web. -->
							</p>
*Notes:*
   * You must have =ROOTCHANGE= access to create a top-level web (one with no parent)
   * A new web created using the =_default= or =_empty= template webs must have their access controls set before public use
   * =_empty= is really empty (only has a <nop>%WEBPREFSTOPIC% topic); normally you want to choose =_default=.
   * Only the person who created it has permission to change the <nop>%WEBPREFSTOPIC% in the new web
</div><!--//foswikiHelp-->%ENDTWISTYTOGGLE%
					</div><!--//col2-->
					<div class="foswikiClear"></div>
					</div><!--//foswikiFormStep-->
					<div class="foswikiFormStep">
						<h3>List on !SiteMap page</h3>
						<div class="col1">
							<p>
								<label><input type="radio" name="SITEMAPLIST" value="on" checked="checked" />show</label> <label><input type="radio" name="SITEMAPLIST" value="" />hide</label>
							</p>
						</div><!--//col1-->
						<div class="col2">
							<p>
								Should the new web be listed on !SiteMap? Even if hidden, the web will be linkable and accessible to users.
							</p>
						</div><!--//col2-->
						<div class="foswikiClear"></div>
					</div><!--//foswikiFormStep-->
					<div class="foswikiFormStep">
						<h3>Include in global search and =%<nop>WEBLIST%= </h3>
						<div class="col1">
							<p class="formOptions">
								<label><input type="radio" name="NOSEARCHALL" value="" checked="checked" />include</label> <label><input type="radio" name="NOSEARCHALL" value="on" />exclude</label>
							</p>
						</div><!--//col1-->
						<div class="col2">
							<p>
								Specify if you want to exclude the web from global search, and from the =%<nop>WEBLIST%= macro used in the WebLeftBarWebsList.
							</p>
						</div><!--//col2-->
						<div class="foswikiClear"></div>
					</div><!--//foswikiFormStep-->
					<div class="foswikiFormStep">
						<h3>Web color</h3>
						<div class="col1">
							<p> %JQREQUIRE{"farbtastic"}%
								<input name="WEBBGCOLOR" class="foswikiInputField jqFarbtastic" type="text" value="#efefef" size="20" />
							</p>
						</div><!--//col1-->
						<div class="col2">
							<p>
								Displayed on !SiteMap and in the left bar (Pattern Skin). %BR%Choose by clicking on the input field, or enter a %POPUPWINDOW{"%SYSTEMWEB%.StandardColors"}%.
							</p>
						</div><!--//col2-->
						<div class="foswikiClear"></div>
					</div><!--//foswikiFormStep-->
				</div><!--//foswikiFormSteps-->
			</div><!--//additionalSettings-->
		</div><!--//foswikiFormStep-->
		<div class="foswikiFormStep">
			<input type="submit" class="foswikiSubmit" value="Create Web" />
		</div><!--//foswikiFormStep-->
	</div><!--//foswikiFormSteps-->
</form>
</noautolink>

---++ In-depth info on Webs
---+++ Subweb preferences are inherited
The [[preference settings]] of a subweb are inherited from the parent web and overridden locally. Preferences are ultimately inherited from the [[%SYSTEMWEB%.%WIKIPREFSTOPIC%]] topic.

*Example Preference Inheritance for =%SANDBOXWEB%/TestWeb/SubWeb.SubWebTopic= topic:*
   1 =%SYSTEMWEB%.%WIKIPREFSTOPIC%= default settings
   1 =%LOCALSITEPREFS%= site-wide settings inherits from and overrides settings in =%SYSTEMWEB%.%WIKIPREFSTOPIC%=
   1 =%SANDBOXWEB%.%WEBPREFSTOPIC%= inherits from and overrides settings in =%LOCALSITEPREFS%=
   1 =%SANDBOXWEB%/TestWeb.%WEBPREFSTOPIC%= inherits from and overrides settings in =%SANDBOXWEB%.%WEBPREFSTOPIC%=
   1 =%SANDBOXWEB%/TestWeb/SubWeb.%WEBPREFSTOPIC%= inherits from and overrides settings in =%SANDBOXWEB%/TestWeb.%WEBPREFSTOPIC%=
   1 =%SANDBOXWEB%/TestWeb/SubWeb.SubWebTopic= inherits from and overrides settings in =%SANDBOXWEB%/TestWeb/SubWeb.%WEBPREFSTOPIC%=

---+++ Subweb navigation
The default Pattern skin indicates Subwebs by indenting them in the sidebar relative to their level in the hierarchy.

#RenameWeb
%STARTSECTION{"rename"}%
---++ Renaming or Deleting a Web
Rename a web via the Tools section in each %WEBPREFSTOPIC% topic. %IF{"{EnableHierarchicalWebs}='1'" then="You may delete a web by moving it into a Trash web." else="Webs cannot be deleted. sub-webs are disabled"}%

---+++ Permissions
You may only rename a web if you have the following permissions
   * You must be allowed to rename and changes topics in the web you want to rename
   * You must be allowed to rename topics in the parent web of the web you want to rename
   * If the web is a root web (i.e. it has no parent web) then you must have permission to both create and rename root webs. These permissions are controlled by the ALLOWROOTCHANGE preference, which can be set in [[%LOCALSITEPREFS%]].
   * If you move the web to another parent web you must be allowed to create and change topics in the new parent web. When you rename a web Foswiki will try and update all links that refer to the old web. You should note that links only get updated in topics that you are allowed to edit. If you use access rights in the Foswiki installation it is generally best to let an administrator rename webs to avoid too many broken links.

---+++ Renaming the webs in the distribution
It is possible, though not recommended, to change the names of the webs in the distribution. If you plan to rename the %USERSWEB% web, remember that Foswiki stores user topics in this web. That means that every WikiName signature - =%USERSWEB%.<nop>SomeUserName= - points to it and would need updating (unless the macro style =%<nop>USERSWEB%.<nop>SomeUserName=, is used throughout). This potentially large change can be performed automatically if you rename the web from the Tools section of %WEBPREFSTOPIC%, as described above.

<div class="foswikiHelp">%X% If you want to rename the %SYSTEMWEB% or %USERSWEB% webs, remember they are referred to in the Foswiki configuration. You will need to change the ={SystemWebName}=, ={UsersWebName}= and/or ={LocalSitePreferences}= settings in the configuration using the [[%SCRIPTURL{configure}%][configure]] interface.

%X% Renaming the webs in the distribution is not recommended because it makes upgrades much more complicated.</div>
%ENDSECTION{"rename"}%

*Related Topics:* AdminDocumentationCategory, AdminToolsCategory
