Help:Namespace

From ISFDB
Jump to navigation Jump to search

Page titles in MediaWiki are composed of two parts: an optional namespace name, and the remainder of the title. For example, this page has the title [[Help:Namespace]], so it is in the Help namespace. A title without a colon, for example [[Goings-on]], is in the main namespace.

By default, a wiki using the MediaWiki software has 18 namespaces, including:

  • the main namespace, where page names have no prefix
  • 15 additional namespaces, each with its own prefix. (Two namespaces, the so-called 'project' namespaces, get their names from the name of the wiki project, and so differ in name from one wiki to the next; on the ISFDB, they are called ISFDB: and ISFDB talk:. On each wiki, these project namespaces (whatever they may happen to be for that wiki), can be referred to by the pseudonyms "Project:" and "Project Talk:", respectively.)
  • two pseudo-namespaces

But take note:

  • 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 allow, among other things, 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.

The core set is the main namespace. Other namespaces that are also useful to 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 random page feature are restricted to the main namespace, thus the user interface is directed towards readers who are not part of the community.

User contributions can show all or be restricted to a namespace of choice.

The subpage feature can be enabled for selected namespaces.

It is possible to customize the visual appearance of pages and the appearance and function of templates based on namespace. See sections Template programming and CSS based namespace detection below.

List of namespaces

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

Note that the number of pages in each namespace may not be displayed on all MediaWiki projects, because this counting feature may be disabled): on this Wiki, per-namespace page counting is currently Template:PAGESINNS:0 Template:PAGESINNS:0 Template:PAGESINNS:0 |disabled|available .

Variables Alternate syntax Name, linked to list of all such pages 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 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 registered users (list: Special:Listusers) have a user homepage User:username (linked to by the system from user names in lists of edits, e.g. on page histories, 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. 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.
{{ns:3}} {{ns:User talk}} User talk  
{{ns:4}} {{ns:ISFDB}} ISFDB the project namespace for matters about the project, such as guidelines and discussions; see also the [[Help:|Help:]] namespace
{{ns:5}} {{ns:ISFDB talk}} ISFDB talk  
{{ns:6}} {{ns:File}} File images and other uploaded files, with image description pages (list: Special:Imagelist)
{{ns:7}} {{ns:File 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}}  
{{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 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
{{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  
{{ns:100}} {{ns:Author}} Author author bibliographies
{{ns:101}} {{ns:Author talk}} Author talk  
{{ns:102}} {{ns:Bio}} Bio author biographies
{{ns:103}} {{ns:Bio talk}} Bio talk  
{{ns:104}} {{ns:Fanzine}} Fanzine fanzines bibliographies
{{ns:105}} {{ns:Fanzine talk}} Fanzine talk  
{{ns:106}} {{ns:Magazine}} Magazine magazine bibliographies
{{ns:107}} {{ns:Magazine talk}} Magazine talk  
{{ns:108}} {{ns:Publication}} Publication publication bibliographies
{{ns:109}} {{ns:Publication talk}} Publication talk  
{{ns:110}} {{ns:Publisher}} Publisher publisher bibliographies
{{ns:111}} {{ns:Publisher talk}} Publisher talk  
{{ns:112}} {{ns:Series}} Series series bibliographies
{{ns:113}} {{ns:Series talk}} Series talk  

Note that all characters of namespace prefixes are case-insensitive, so one can write, for example, "mediawiki". Also, underscores in namespace prefixes are equivalent to any non-zero number of spaces (leading or trailing spaces or underscores are ignored) : underscores are used only when encoding URLs but treated otherwise like spaces.

These names are set in the MessagesXX.php language files. The English defaults are below:

/* private */ $namespaceNames = 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'
);


This page is derived from the MediaWiki help page on Namespace