• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Namespace name/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Namespace name
This is the template sandbox page for Template:Namespace name (diff).
Template documentation[view] [edit] [history] [purge]

Usage

edit
Wikipedia data structure
  • v
  • t
  • e
Namespaces
Subject namespaces Talk namespaces
0 (Main/Article) Talk 1
2 User User talk 3
4 Wikipedia Wikipedia talk 5
6 File File talk 7
8 MediaWiki MediaWiki talk 9
10 Template Template talk 11
12 Help Help talk 13
14 Category Category talk 15
100 Portal Portal talk 101
118 Draft Draft talk 119
126 MOS MOS talk 127
710 TimedText TimedText talk 711
828 Module Module talk 829
1728 Event Event talk 1729
Former namespaces
108 Book Book talk 109
442 Course Course talk 443
444 Institution Institution talk 445
446 Education Program Education Program talk 447
2300 Gadget Gadget talk 2301
2302 Gadget definition Gadget definition talk 2303
2600 Topic 2601
Virtual namespaces
-1 Special
-2 Media
Current list

This returns the proper namespace name, given the single parameter of its ID number, per Template:Namespaces. For example:

{{Namespace name|1}}

Talk

{{Namespace name|711}}

TimedText talk

Plays well with {{Database report}}.

This does, more or less, the same thing as the magic word {{ns:711}} (and it indeed incorporates that magic word to handle alphabetic input). However, it adds the functionality of parsing deprecated namespaces as well, like Book: and Gadget: et cetera.

See also

edit
  • {{Namespaces}}
  • {{Namespace detect}}
  • {{Database report}}
The above documentation is transcluded from Template:Namespace name/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Namespace_name/sandbox&oldid=1222678227"
Last edited on 7 May 2024, at 09:06

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 7 May 2024, at 09:06 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop