Template:H:Namespace variables

Word Example Explanation
{{ns:}} {{ns:4}} = Meta
{{ns:project}} = Meta
Returns the name of a given namespace number.
{{localurl:x y @}}
{{localurle:x y @}}
{{localurl:a|b=c}}
/wiki/X_y_@
/wiki/X_y_@
/w/index.php?title=A&b=c
Returns the local URL of a page (might not exist). Optional query parameter, see Help:Variable.
{{urlencode:x y @}} x+y+%40 [MW1.7+] Encodes variable values for use in external links. [1]
{{anchorencode:x #y @}} x_#y_@ [MW1.8+] Encodes variable values for use in section anchors. [2]
{{fullurl:x y @}}
{{fullurle:x y @}}
{{fullurl:m:a|b=c}}
//meta.wikimedia.org/wiki/X_y_@
//meta.wikimedia.org/wiki/X_y_@
https://meta.wikimedia.org/wiki/a?b=c
[MW1.5+] Returns the full URL of a given page. Optional query parameter as for localurl:.


Note to future editors: this page is referenced from help pages so that all references to this table can use the same information so that different help pages that reference this table don't have different information.