Help:Namespace

From InfoAnarchy
Jump to: navigation, search

Help index - Deutsch

A namespace is a type of page in a wiki project. Each wiki using the MediaWiki software has 16+2 namespaces: the main namespace, where page names have no prefix, 15 auxiliary types, each with its own prefix, and two pseudo-namespaces.

They are similar to the 18 explained in w:Wikipedia:Namespace for Wikipedia. One of these is the project namespace, which uses as prefix the project prefix (variable {{ns:4}} below).

List of namespaces

The two pseudo-namespaces, main namespace and 15 auxiliary namespaces in this project (Meta) are the following (also the variables for them are shown):

Variables Alternate syntax Name Notes
{{ns:-2}} {{ns:Media}} "Media" pseudo-namespace for images and other files themselves, as opposed to the image description pages; see also below
{{ns:-1}} {{ns:Special}} "Special" pseudo-namespace for special pages (list: Special:Specialpages)
{{ns:0}} "" main namespace, no prefix, or optionally a colon (this is needed when using the page as template)
{{ns:1}} {{ns:Talk}} "Talk" see Help:Talk page for this and the following odd-numbered namespaces
{{ns:2}} {{ns:User}} "User" logged-in users (list: Special:Listusers) have a user homepage User:username (linked to by the system from lines about edits, and from signatures on talk pages; this and subpages of it can be used to present oneself, for project-related bookmarks, and for drafts, tests, and other working material. For users who do not log in, the same applies, with the IP as username. Dynamic IPs are a complication.
{{ns:3}} {{ns:User_talk}} "User talk"  
{{ns:4}} {{ns:Project}} "InfoAnarchy" the project namespace for matters about the project, such as guidelines and discussions; see also the Help namespace
{{ns:5}} {{ns:Project_talk}} "InfoAnarchy talk"  
{{ns:6}} {{ns:Image}} "File" images and other uploaded files, with image description pages (list: Special:Imagelist)
{{ns:7}} {{ns:Image_talk}} "File talk"  
{{ns:8}} {{ns:MediaWiki}} "MediaWiki" system messages (list: Special:Allmessages), editable by users, or if protected, by sysops
{{ns:9}} {{ns:MediaWiki_talk}} "MediaWiki talk"  
{{ns:10}} {{ns:Template}} "Template" the default namespace for templates: the wikitext code {{name }} refers to and includes the page Template:name
{{ns:11}} {{ns:Template_talk}} "Template talk"  
{{ns:12}} {{ns:Help}} "Help" here on Meta used for the MediaWiki User's Guide. see Help:Contents; on many other projects this namespace is not much used, and the project namespace is used instead
{{ns:13}} {{ns:Help_talk}} "Help talk"  
{{ns:14}} {{ns:Category}} "Category" each page (list: Special:Categories) represents a category of pages, with each category page displaying a list of pages in that category and optional additional text.
{{ns:15}} {{ns:Category_talk}} "Category talk"  

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 listed in Locales for the Wikimedia projects, with default Language.php:

/* 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'
);

Automatic conversions of page names

On the left in the table at the beginning of the previous section, a list of project-independent namespace names is shown, 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. on Meta Project:xyz is equivalent with Meta:xyz, like a piped link. Therefore a 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.

Prefixes in various languages

For Wikimedia projects this project prefix is "Wikipedia:", "Wiktionary:", "Wikibooks:", "Wikisource:", "Wikiquote:", "Meta:", and in the case of In Memoriam also "Wikipedia:" (in French "Wikipédia:", in Czech "Wikipedie:", in Russian "Википедия:", in Korean "위키백과:", in Hindi "विकिपीडिया:", in Hebrew ":ויקיפדיה" and in Arabic ":ويكيبيديا"). The last two are RTL languages which put the prefixes on the right. In URLs the prefixes are always on the left.

To check which prefix is used, see e.g. the link "Contact us" or "Bug reports". "Talk", "User", "Image" and combinations can also be translated in the case of non-English wikis. see Locales for the Wikipedia Software.

Lists of pages

Since Special:Allpages excludes pages in the project prefix namespace it is unfortunate that there is not always an equivalent of w:Wikipedia:List of articles in the Wikipedia namespace).

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 {{NAMESPACE}} which returns the namespace. For this page it returns "Help". The same code would return an empty string for a page in the main namespace. Similarly, {{PAGENAME}} returns the page name without prefix. For this page it returns "Namespace".

To take some examples from Wiktionary: Wiktionary:FAQ has Talk page Wiktionary talk:FAQ, but Wiktionary Appendix:Colours has Talk page Talk:Wiktionary Appendix:Colours, because the first is in the project preface namespace and the second is not. Accordingly the first is not in Special:Allpages but the second is. Unclear is why Wiktionary:Recentchanges is an exception.

Sites outside Wikimedia

Sites using MediaWiki but outside Wikimedia usually have their own project name as project prefix, but several have simply retained "Wikipedia:".

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.

Tab labels

The first tab shows the namespace. For Meta itself it is as shown on the right.

  • category: mediawiki:nstab-category => "Category"
  • help: 'nstab-help' => "Help",
  • image: 'nstab-image' => "Image",
  • main: 'nstab-main' => "content page",
  • media: 'nstab-media' => "Media",
  • mediawiki: 'nstab-mediawiki' => "Message",
  • project: 'nstab-wp' => "About",
  • special: 'nstab-special' => "Special" - the tab is in an HTML element A without class or id, like an internal link, but it is not a link; to see the distinction, use a style for a:link and a:visited that is different from the style of just "a"
  • template: 'nstab-template' => "Template",
  • user: 'nstab-user' => "User page",

The second tab, linking to the talk page:

  • Talk: 'talk' => "Discussion"

On a diff page or a page with an old version, the links are to the current version (however, the edit tab on a page with an old version links to the edit page of that old version; this does not apply on a diff page comparing two old versions, there the edit tab links to the edit page for the current version).

The self link feature (a self link appearing as bold text) does not work for the tabs, no distinction is shown between a self link and a link to a different (version of a) page.

With the class "selected" one can let the tab for the same namespace as the current page (either a self link or a link to the current revison) be displayed differently; also the tabs "edit" and "history" are then displayed in this different way when applicable.

See also

Help contents

Reading: Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview | New page | Images/files | Image description page | Special characters | Formula | Table | EasyTimeline | Template | Renaming (moving) a page | Automatic conversion of wikitext | Talk page | Testing