Help:Namespaces
Jump to navigation
Jump to search
This is a short guide collecting information about wiki namespaces. It can be helpful when creating templates.
Namespaces on this Wiki:
- {{ns:0}} –
- {{ns:1}} – Talk
- {{ns:2}} – User
- {{ns:3}} – User talk
- {{ns:4}} – Wiki
- {{ns:5}} – Wiki talk
- {{ns:6}} – File
- {{ns:7}} – File talk
- {{ns:8}} – MediaWiki
- {{ns:9}} – MediaWiki talk
- {{ns:10}} – Template
- {{ns:11}} – Template talk
- {{ns:12}} – Help
- {{ns:13}} – Help talk
- {{ns:14}} – Category
- {{ns:15}} – Category talk
- {{ns:120}} – Item
- {{ns:121}} – Item talk
- {{ns:122}} – Property
- {{ns:123}} – Property talk
- {{ns:200}} – DE
- {{ns:201}} – DE talk
- {{ns:202}} – FR
- {{ns:203}} – FR talk
- {{ns:204}} – ES
- {{ns:205}} – ES talk
- {{ns:206}} – IT
- {{ns:207}} – IT talk
- {{ns:208}} – NL
- {{ns:209}} – NL talk
- {{ns:210}} – RU
- {{ns:211}} – RU talk
- {{ns:212}} – JA
- {{ns:213}} – JA talk
- {{ns:710}} – TimedText
- {{ns:711}} – TimedText talk
- {{ns:828}} – Module
- {{ns:829}} – Module talk
- {{ns:2300}} – Gadget
- {{ns:2301}} – Gadget talk
- {{ns:2302}} – Gadget definition
- {{ns:2303}} – Gadget definition talk
- {{ns:3000}} – Proposal
- {{ns:3001}} – Proposal talk
On this Wiki we also have pseudonamespaces like "Cs:", "Pt:" etc.
Magic words:
- {{NAMESPACE}} – Help
- {{NAMESPACENUMBER}} – 12
- {{SUBJECTSPACE}} or {{ARTICLESPACE}} – Help
See more on mw:Help:Magic words#Namespaces
In Lua
This section needs expansion. You can help by adding to it.
Wikitext | Lua |
---|---|
{{NAMESPACE}} | mw.title.getCurrentTitle().nsText
|
{{NAMESPACENUMBER}} | mw.title.getCurrentTitle().namespace
|
{{SUBJECTSPACE}} or {{ARTICLESPACE}} |
mw.title.getCurrentTitle().subjectNsText
|
{{ns:0}} | mw.site.namespaces[0].name
|
{{ns:Wiki}} | mw.site.namespaces.Wiki.name
|
You can define a variable, for example:
local ns = mw.title.getCurrentTitle().namespace
External links
- Help:Namespaces on MediaWiki.org
- Wikipedia:Namespace#Programming on Wikipedia