Difference between revisions of "Help:Namespace"

From LinuxMCE
Jump to: navigation, search
(How to specify the namespace(s) to search)
(Namespace variables)
Line 56: Line 56:
  
 
{{p}}
 
{{p}}
 +
 +
 +
==Namespace administration==
 +
===Built-in namespaces===
 +
MediaWiki ships with 18 built-in namespaces.
 +
 +
The following 8 namespaces all have associated discussion namespaces.
 +
 +
{| class="datatable" border="1"
 +
! Index !! Name !! Purpose !! Comments
 +
|-
 +
| 0 || Main || "Real" content; articles || Has no prefix
 +
|-
 +
| 1 || Talk || Talk pages of "Real" content ||
 +
|-
 +
| 2 || User || [[Help:User page|User pages]]
 +
|-
 +
| 3 || User talk || Talk pages for User Pages ||
 +
|-
 +
| 4 || Project || Information about the wiki || Prefix is the same as <tt>[[Manual:$wgSitename|$wgSitename]]</tt>
 +
|-
 +
| 5 || Project talk ||
 +
|-
 +
| 6 || File || Media description pages
 +
|-
 +
| 7 || File talk ||
 +
|-
 +
| 8 || MediaWiki || Site interface customisation  || Protected
 +
|-
 +
| 9 || MediaWiki talk ||
 +
|-
 +
| 10 || Template || Template pages
 +
|-
 +
| 11 || Template talk ||
 +
|-
 +
| 12 || Help || Help pages
 +
|-
 +
| 13 || Help talk ||
 +
|-
 +
| 14 || Category || Category description pages
 +
|-
 +
| 15 || Category talk ||
 +
|}
 +
 +
2 other namespaces have negative indexes and have special purposes. You cannot create or delete pages in these namespaces, and there are no corresponding discussion namespaces.
 +
 +
{| class="datatable"
 +
! Index !! Name !! Purpose
 +
|-
 +
| -1 || Special|| Holds special pages
 +
|-
 +
| -2 || Media || Alias for direct links to media files
 +
|}

Revision as of 00:29, 30 September 2012

Home | Editing help | Table of contents (2)



Introduction to namespaces

Namespaces: the containers

Articles in MediaWiki are placed in locations called "namespaces". Namespaces are the MediaWiki architecture components that hold all articles. The final location of an article is the one that has been specified through its title prefix following the construct Namespace:Title.
If an article is titled without the use of the optional location prefix (:Title), it is placed in the main namespace, which is the default location. This is so because the main namespace is the null character.

Why namespaces?

Namespaces are administrative boundaries used to separate content from policy and discussion.
They isolate pages based on their intended use:

  • public viewing
  • private information intended for the editing community.



When is a new namespace needed?

Mainly when a content type is to be reserved for a defined group of users. If you are a user, all you need to know is that all articles are in the "Main" namespace by default. You do not need a new namespace. Continue reading from #Where to place the article? below.



Working with namespaces

How to view the contents of a namespace

The special page "Special:Allpages" contains all the articles created in the wiki by its editors. It lists the contents of the "Main" namespace.
The "Namespace:" drop down menu on that page enables you to select a different namespace and click the "Go" button to view the articles it contains.

These work:  [[Special:Allpages]]  [[Special:Specialpages]]    [[:help]] 
These don't: [[Special:Help]][[Help:]]
[Help:] [[Special:Help:]] [[innamespace:Help]]



Where to place the article?

Before starting a new article, a decision has to be made about its intended use and audience. Each new article should be placed in the namespace that has related articles that are used for the same purpose.

Placing an article in a namespace

The final location of an article is determined through its title. The title of an article is a special structure that provides a facility to specify the destination of the article.
The construct is: Location:Title.
The location prefix specifies where the article should be located in reference to all other articles on the wiki.

Moving articles between namespaces

To move an article, all that is needed is a change of prefix (location).

How to specify the namespace(s) to search

The namespaces searched are the ones specified in the "search" section of the Preferences.

Namespace variables

The namespace is returned by {{NAMESPACE}} . On this page, it returns "Help".

{{FULLPAGENAME}} returns both the namespace and pagename as follows: "Help:Namespace"

The following does not work for this implementation but is included here for reference purposes.
List and numbers of the namespaces: http://wiki.linuxmce.org/api.php?action=query&meta=siteinfo&siprop=namespaces

Click here to view a detailed list of the namespaces in this wiki.




Namespace administration

Built-in namespaces

MediaWiki ships with 18 built-in namespaces.

The following 8 namespaces all have associated discussion namespaces.

Index Name Purpose Comments
0 Main "Real" content; articles Has no prefix
1 Talk Talk pages of "Real" content
2 User User pages
3 User talk Talk pages for User Pages
4 Project Information about the wiki Prefix is the same as $wgSitename
5 Project talk
6 File Media description pages
7 File talk
8 MediaWiki Site interface customisation Protected
9 MediaWiki talk
10 Template Template pages
11 Template talk
12 Help Help pages
13 Help talk
14 Category Category description pages
15 Category talk

2 other namespaces have negative indexes and have special purposes. You cannot create or delete pages in these namespaces, and there are no corresponding discussion namespaces.

Index Name Purpose
-1 Special Holds special pages
-2 Media Alias for direct links to media files