Template:H:Namespace variables

From Meta, a Wikimedia project coordination wiki
Word Example Explanation
{{ns:}} {{ns:4}} = Meta
{{ns:project}} = Meta
Returns the name of a given namespace number.
{{localurl:x y @}}
{{localurle:x y @}}
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 @}}
[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.