Template:NAMESPACEID/doc

From MattWiki
Jump to: navigation, search

Returns the namespace ID of page given, or of the current page.

Wikipedia namespaces
Subject namespaces Talk namespaces
0 (Main/Article) Talk 1
2 User User talk 3
4 MattWiki MattWiki 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 [[Wikipedia:Portal|]] 101
108 [[Wikipedia:Books|]] 109
118 [[Wikipedia:Drafts|]] 119
446 [[Wikipedia:Course pages|]] 447
710 [[mw:Extension:TimedMediaHandler|]] 711
828 Module Module talk 829
2300 Gadget Gadget talk 2301
2302 Gadget definition Gadget definition talk 2303
2600 [[Wikipedia:Flow|]]
Virtual namespaces
-1 Special
-2 Media

Usage

Namespace aliases are accepted, too:

Invalid input returns an error, which can be caught with the #iferror parser function:

See also