Predloga:NAMESPACEID
10
Returns the namespace ID of page given, or of the current page. Predloga:Namespaces
Usage[uredi kodo]
{{NAMESPACEID}}
→ 10{{NAMESPACEID|}}
→ 0 (Imenski prostor člankov){{NAMESPACEID|{{ns:0}}}}
→ 0 (Imenski prostor člankov){{NAMESPACEID|Talk}}
→ 1
Namespace aliases are accepted, too:
{{NAMESPACEID|Image}}
→ 6{{NAMESPACEID|File}}
→ 6{{NAMESPACEID|WP}}
→ 4{{NAMESPACEID|Project}}
→ 4{{NAMESPACEID|Wikipedija}}
→ 4
Invalid input returns an error, which can be caught with the #iferror parser function:
{{NAMESPACEID|Foo}}
→ Napačni imenski prostor {{NAMESPACEID}}