Difference between revisions of "Help:Namespace"

From LinuxMCE
Jump to: navigation, search
(When is a new namespace needed?)
(How to specify the namespace(s) to search)
Line 42: Line 42:
 
===How to specify the namespace(s) to search===
 
===How to specify the namespace(s) to search===
 
The namespaces searched are the ones specified in the "search" section of the [[Special:Preferences|Preferences]].
 
The namespaces searched are the ones specified in the "search" section of the [[Special:Preferences|Preferences]].
 +
{{p}}
 +
 +
=== Namespace [[Help:Variables | variables]] ===
 +
 +
The namespace is returned by <nowiki> {{NAMESPACE}} </nowiki>. On this page, it returns "'''{{NAMESPACE}}'''".<br>
 +
 +
<nowiki>{{FULLPAGENAME}}  </nowiki> returns both the namespace and pagename as follows: "'''{{FULLPAGENAME}}'''"
 +
 +
The following does not work for this implementation but is included here for reference purposes.<br>
 +
List and numbers of the namespaces: {{SERVER}}{{SCRIPTPATH}}/api.php?action=query&meta=siteinfo&siprop=namespaces<br>
 +
 +
Click [{{SERVER}}{{SCRIPTPATH}}/api.php?action=query&meta=siteinfo&siprop=namespaces here] to view a detailed list of the namespaces in this wiki.
 +
 
{{p}}
 
{{p}}

Revision as of 00:28, 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.