Changes

Jump to: navigation, search

Help:Namespace

10,566 bytes added, 06:53, 25 April 2006
no edit summary
[[Category:Help]]{{Editor toc}}
Page titles in {{SITENAME}} are composed of two parts: an optional namespace name, and the remainder of the title. For example, this page has the title <nowiki>[[</nowiki>{{NAMESPACE}}:{{PAGENAME}}<nowiki>]]</nowiki>, so it is in the ''{{NAMESPACE}} namespace''. A title without a colon is in the ''main namespace''.

Each wiki using the MediaWiki software has 16+2 '''namespaces''': the main namespace, where page names have no prefix, 15 additional namespaces, each with its own prefix, and two pseudo-namespaces. In each project they are similar to the 18 explained in [http://en.wikipedia.org/wiki/Wikipedia:Namespace Namespace] for Wikipedia. One of these is the project namespace, which uses as prefix the project prefix (variable <nowiki>{{ns:4}}</nowiki> below). Some projects have additional custom namespaces.

If a page title contains a colon, but the initial part of the title is ''not'' one of the pre-defined namespaces, that page is considered to be in the main namespace.

==Namespace uses==
Namespaces among other things allow a separation of content from policy and discussion. They encourage separation of the pages of a wiki into a core set intended for public viewing, and private information intended for the editing community.

This core set is the main namespace. Other namespaces that are useful also for people who are just viewers are:
*the image namespace (with the full-size images)
*the category namespace (for navigation)
*the help pages and the preferences page (as far as they concern viewing)

By default, searches and the [[Special:Randompage|random page feature]] are restricted to the main namespace, thus the user interface is directed towards readers who are not part of the community. Note that this separation of community and readership is not a feature of many wiki engines. It may not be required for your editing community. You are always free to put discussion and policy in the main namespace, if you desire.

On most Wikimedia wikis, pages in the main namespace and a few other ones are actively policed by the community, with inappropriate content being quickly removed. The rules for the other namespaces are generally more relaxed.

*[[Special:Allpages]] can be applied to a namespace of choice
{{H:new|[[Help:Recent changes|Recent changes]] ditto; for each of the two, one can also select all namespaces except a specified one; thus, although one cannot have a single list of all pages, one can select a small namespace and use the invert option, to get almost all pages.}}
*[[Help:Searching|Searching]] can be restricted to any subset of namespaces

[[Help:User contributions|User contributions]] can only show all; not working anymore: or be restricted to a namespace of choice.

It is possible to customise the visual appearance of pages by namespace; also enabling the [[Help:Link#Subpage feature|subpage feature]] can be done for selected namespaces.

==List of namespaces==
The two pseudo-namespaces, main namespace and 15 auxiliary namespaces in ''this'' project (Meta) are as follows (the [[help:Variable|variable]]s for them are also shown):

{| {{prettytable}}
|-
!Variables
!Alternate syntax
!Name, linked to list of all pages
!Notes
|-
|<nowiki>{{ns:-2}}</nowiki>
|<nowiki>{{ns:Media}}</nowiki>
|&quot;{{ns:-2}}&quot;
|pseudo-namespace for images and other files themselves, as opposed to the image description pages; see also below
|-
|<nowiki>{{ns:-1}}</nowiki>
|<nowiki>{{ns:Special}}</nowiki>
|&quot;{{ns:-1}}&quot;
|pseudo-namespace for [[Help:Special page|special page]]s (list: [[Special:Specialpages]])
|-
|colspan="2"|-
|[{{SERVER}}{{localurl:Special:Allpages|namespace=0}} main]
|main namespace, no prefix, or optionally a colon (this is needed when using the page as template)
|-
|<nowiki>{{ns:1}}</nowiki>
|<nowiki>{{ns:Talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=1}} {{ns:1}}]
|see [[:Help:Talk page]] for this and the following odd-numbered namespaces
|-
|<nowiki>{{ns:2}}</nowiki>
|<nowiki>{{ns:User}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=2}} {{ns:2}}]
|logged-in users (list: [[Special:Listusers]]) have a user homepage User:''username'' (linked to by the system from user names in [[Help:Edit_summary#Places_where_the_edit_summary_appears|lists of edits]], e.g. on [[Help:Page history|page histories]], and from signatures on talk pages); this and [[Help:Link#Subpage_feature|subpages]] of it can be used to present oneself, for project-related bookmarks, and for drafts, tests, and other working material. One can put here material to give oneself one-step access to it from any page in the same project, and one can put here links to give oneself two-step access to the link targets from any page in the same project as the user page. For users who do not log in, the same applies, with the IP as username. Dynamic IPs are a complication.
|-
|<nowiki>{{ns:3}}</nowiki>
|<nowiki>{{ns:User_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=3}} {{ns:3}}]
|&nbsp;
|-
|<nowiki>{{ns:4}}</nowiki>
|<nowiki>{{ns:Project}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=4}} {{ns:4}}]
|the project namespace for matters ''about'' the project, such as guidelines and discussions; see also the Help namespace
|-
|<nowiki>{{ns:5}}</nowiki>
|<nowiki>{{ns:Project_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=5}} {{ns:5}}]
|&nbsp;
|-
|<nowiki>{{ns:6}}</nowiki>
|<nowiki>{{ns:Image}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=6}} {{ns:6}}]
|[[help:images and other uploaded files|images and other uploaded files]], with [[Help:Image page|image description page]]s (list: [[Special:Imagelist]])
|-
|<nowiki>{{ns:7}}</nowiki>
|<nowiki>{{ns:Image_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=7}} {{ns:7}}]
|&nbsp;
|-
|<nowiki>{{ns:8}}</nowiki>
|<nowiki>{{ns:MediaWiki}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=8}} {{ns:8}}]
|system messages (list: [[Special:Allmessages]]), editable by users, or if protected, by sysops
|-
|<nowiki>{{ns:9}}</nowiki>
|<nowiki>{{ns:MediaWiki_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=9}} {{ns:9}}]
|&nbsp;
|-
|<nowiki>{{ns:10}}</nowiki>
|<nowiki>{{ns:Template}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=10}} {{ns:10}}]
|the default namespace for [[help:template|template]]s: the wikitext code <nowiki>{{</nowiki>''name'' }} refers to and includes the page Template:''name''
|-
|<nowiki>{{ns:11}}</nowiki>
|<nowiki>{{ns:Template_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=11}} {{ns:11}}]
|&nbsp;
|-
|<nowiki>{{ns:12}}</nowiki>
|<nowiki>{{ns:Help}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=12}} {{ns:12}}]
|typically used for the MediaWiki User's Guide, with the wikitext a frequently refreshed copy of the master version on Meta-Wikipedia, but with project-specific templates
|-
|<nowiki>{{ns:13}}</nowiki>
|<nowiki>{{ns:Help_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=13}} {{ns:13}}]
|&nbsp;
|-
|<nowiki>{{ns:14}}</nowiki>
|<nowiki>{{ns:Category}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=14}} {{ns:14}}]
|each page (list: [[Special:Categories]]) represents a [[Help:Categories|category]] of pages, with each category page displaying a list of pages in that category and optional additional text.

|-
|<nowiki>{{ns:15}}</nowiki>
|<nowiki>{{ns:Category_talk}}</nowiki>
|[{{SERVER}}{{localurl:Special:Allpages|namespace=15}} {{ns:15}}]
|&nbsp;
|}

Note that all characters of namespace prefixes are case-insensitive, so one can write e.g "mediawiki".

The names are set in files such as those found in most Wikimedia projects, with default Language.php:

<pre>
/* private */ $wgNamespaceNamesEn = array(
NS_MEDIA => 'Media',
NS_SPECIAL => 'Special',
NS_MAIN => '',
NS_TALK => 'Talk',
NS_USER => 'User',
NS_USER_TALK => 'User_talk',
NS_WIKIPEDIA => $wgMetaNamespace,
NS_WIKIPEDIA_TALK => $wgMetaNamespace . '_talk',
NS_IMAGE => 'Image',
NS_IMAGE_TALK => 'Image_talk',
NS_MEDIAWIKI => 'MediaWiki',
NS_MEDIAWIKI_TALK => 'MediaWiki_talk',
NS_TEMPLATE => 'Template',
NS_TEMPLATE_TALK => 'Template_talk',
NS_HELP => 'Help',
NS_HELP_TALK => 'Help_talk',
NS_CATEGORY => 'Category',
NS_CATEGORY_TALK => 'Category_talk'
);</pre>

==Automatic conversions of page names==
On the column "Alternate syntax" in the table at the beginning of the previous section, a list of project-independent namespace names is shown in the form of <nowiki>{{ns:</nowiki>''namespace name''<nowiki>}}</nowiki>, the same as those on Meta and the English Wikipedia, except that "Meta" and "Wikipedia" are replaced by "Project". The prefixes are the terms listed, followed by a colon.

The prefix "Project:" is for every project automatically converted to the project namespace, e.g. try the link [[Project:xyz]]. It is like a [[Help:Piped link|piped link]]. Therefore a [[Help:Page name|page name]] starting with "Project:" is not possible (unless, of course, that is the name of the project).

Similarly the other project-independent namespace prefixes are also automatically converted to the project-specific ones.

An exception to the rule that the link label is the name used in the wikitext and not the converted name, applies if the target of a redirect is expressed using a project-independent namespace name: in that case the converted name is shown on the redirect page, compare [http://meta.wikimedia.org/w/index.php?title=Babel&redirect=no] with the preview of [http://meta.wikimedia.org/w/index.php?title=Babel&action=edit].

==Colon in page name==
Adding a colon to a page name does not automatically create a new namespace. To see the namespace of a page, use <nowiki>{{NAMESPACE}}</nowiki> which returns the namespace. For this page it returns "{{NAMESPACE}}". The same code would return an empty string for a page in the main namespace. Similarly, <nowiki>{{PAGENAME}}</nowiki> returns the page name without prefix. For this page it returns "{{PAGENAME}}". <nowiki>{{FULLPAGENAME}}</nowiki> returns both namespace and pagename; for this page, that is "{{FULLPAGENAME}}".

==Special namespace==
Main article: '''[[Help:Special page]]'''

The namespace "Special:" consists of "special pages", which are created by the software on demand, for example [[Special:Recentchanges]].

==See also==
*[[Help:Talk page]]
*[[Help:Template]]
Root Admin, Bots, Bureaucrats, flow-bot, oversight, Administrators, Widget editors
24,656
edits

Navigation menu