Template:H:Namespace variables
![]() | This template is being considered for deletion at requests for deletion. Please see the discussion there. If this page matches one of the criteria for speedy deletion, use{{delete|reason}} instead.Please consider notifying the author and/or the principal contributors of this template using {{subst:RfD notice|Template:H:Namespace variables}} --~~~~ on their talk pages. You may use {{subst:RFD2|Template:H:Namespace variables|Reasons here. --~~~~}} under the appropriate section of Meta:Requests for deletion to start the deletion discussion. |
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_@
|
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.