User:Flutter/Help:Parser functions
Jump to navigation
Jump to search
Not working at the position of the page where the tag is located but on the page header, and throughout the page, respectively (see below):
DISPLAYTITLE: allow the page header to be different from the page name.- DEFAULTSORT: Sets a default category sort key for the page.
Namespaces and URLs[edit | edit source]
Word | Example | Explanation |
---|---|---|
{{ns:}} | {{ns:4}} = Uncyclopedia {{ns:project}} = Uncyclopedia
|
Returns the local name of a given namespace number. |
{{localurl:x y @}} {{localurle:x y @}} {{localurl:a|b=c}} {{localurl:Wikipedia:Category}} |
/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}} |
https://en.uncyclopedia.co/wiki/X_y_@ https://en.uncyclopedia.co/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:. |
Formatting[edit | edit source]
Word | Example | Explanation |
---|---|---|
{{#language:}} | {{#language:da}} = dansk
|
[MW1.7+] Native name of language code. |
{{lc:}} | {{lc:AbC dEf}} = abc def
|
[MW1.5+] LowerCase |
{{lcfirst:}} | {{lcfirst:Ab Cd}} = ab Cd
|
[MW1.5+] LC first char. |
{{uc:}} | {{uc:aBc DeF}} = ABC DEF
|
[MW1.5+] UpperCase |
{{ucfirst:}} | {{ucfirst:aB cD}} = AB cD
|
[MW1.5+] UC first char. |
{{formatnum:}} | {{formatnum:-299792458.56789}} = −299,792,458.56789
|
[MW1.7+] Add decimal separators according to the wiki's default locale. Leading minus and plus are recognized. |
{{padleft:}} {{padright:}} |
{{padleft:7|3|0}} = {{padleft:bcd|6|{{!}}}} = |
First case is, for example, applicable to years in a category... giving an ordered year to sort by pipetricks order, or any such ordering where left extended zeros allow a proper sorting. [MW1.8+] Pads a string with a character to the specified width. Note that there's a little bug that interprets non-US-ASCII characters as two, instead of one character (see the difference in café and cafe in the examples.) It does not seem possible to use padleft and padright for padding with characters with a multi-character code, such as |