Difference between revisions of "Help:Magic words"

From SacredWiki
Jump to navigation Jump to search
m (1 revision(s))
 
m (1 revision: Updating our Help Pages)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''Magic words''' are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page names. This page is about usage of standard magic words; for a technical reference, see {{Mediawiki|Manual:Magic words}}.
+
{{Notice|1=
 +
See '''[[mw:Help:Magic words|Help:Magic words]] on [[mw:|www.mediawiki.org]]''' for more magic words in the MediaWiki software. The page here is currently kept for things not yet merged to www.mediawiki.org and for documentation specific to the Wikimedia Foundation. If something is missing from both pages, check the [//meta.wikimedia.org/w/index.php?title=Help:Magic_words&oldid=3392669 full version of this page] and restore the lacking information.
 +
}}
  
There are three general types of magic words:
+
{{H:h|editor toc}}
*'''[[#Behavior switches|Behavior switches]]''': these are uppercase words surrounded by double underscores, ''e.g.'' '''__FOO__'''
 
*'''[[#Variables|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<tt><tt><nowiki>{{FOO}}</nowiki></tt></tt>'''. As such, they look a lot like [[Help:Templates|templates]].
 
*'''[[#Parser functions|Parser functions]]''': these take parameters and are either of the form '''<tt><tt><nowiki>{{foo:...}}</nowiki></tt></tt>''' or '''<tt><tt><nowiki>{{#foo:...}}</nowiki></tt></tt>'''. See also {{mediawiki|Help:Extension:ParserFunctions}}.
 
  
Page-dependent magic words will affect or return data about the ''current'' page (by default), even if the word is added through a transcluded template or included system message.
+
This is an organized index of magic words used in MediaWiki.
  
==Behavior switches==
+
A "'''[[w:Magic (programming)|magic]] word'''" is a symbol recognized by the MediaWiki software and which when seen in the non-commented text of the page, triggers the software to do something other than display that symbol, or transclude a page with that name, but instead to use the symbol directly.  
A behavior switch controls the layout or behaviour of the page and can often be used to specify desired omissions and inclusions in the content.
 
  
{| {{prettytable}}
+
A magic word can be:
|-
+
* a behavior switch, called using an upper case word, preceded and followed by pairs of underscores, e.g. '''<nowiki>__NOTOC__</nowiki>'''
!{{Hl2}}| Word
+
* [[Help:XML-style tags|XML-style tags]], preceded by "<" (and for the end tag "/") and followed by ">", as in '''&lt;nowiki>'''...'''&lt;/nowiki>'''
!{{Hl2}}| Description
+
* a [[help:parser function|parser function]]: similar to a template, a word preceded by the symbols "'''<nowiki>{{</nowiki>'''" and followed by "'''<nowiki>}}</nowiki>'''", and optionally parameter definitions between pipe characters, except that the part before the first pipe (or without pipes, the text between the braces) contains a colon ("''':'''"), e.g. <nowiki>{{</nowiki>'''ns:'''3}} and {{'''#ifexpr:'''<nowiki>{{{1}}}>3|large|small}}</nowiki>
!{{Hl2}}| Versions
+
* a [[help:variable|variable]]: similar to a template without parameters, a word preceded by the symbols "'''<nowiki>{{</nowiki>'''" and followed by "'''<nowiki>}}</nowiki>'''", except the word used is in all upper case, e.g. '''<nowiki>{{CURRENTDAY}}</nowiki>'''  
|-
+
* a template modifier
|{{Hl3}} colspan="3"| '''Table of contents'''
+
* an image modifier
|-
 
| <nowiki>__NOTOC__</nowiki>
 
| Hides the table of contents (TOC).
 
|
 
|-
 
|<nowiki>__FORCETOC__</nowiki>
 
| Forces the table of content to appear at its normal position (above the first header).
 
|
 
|-
 
| <nowiki>__TOC__</nowiki>
 
| Places a table of contents at the word's current position (overriding <nowiki>__NOTOC__</nowiki>). If this is used multiple times, the table of contents will appear at the first word's position.
 
|
 
|-
 
|{{Hl3}} colspan="3"| '''Editing'''
 
|-
 
| <nowiki>__NOEDITSECTION__</nowiki>
 
| Hides the section edit links beside headings.
 
|
 
|-
 
| <nowiki>__NEWSECTIONLINK__</nowiki>
 
| Adds a link ([[MediaWiki:Addsection|"+" by default]]) beside the "edit" tab for adding a new section on a non-talk page (see {{mediawiki|m:Help:Section#Adding a section at the end|Adding a section to the end}}).
 
| 1.7+
 
|-
 
| <nowiki>__NONEWSECTIONLINK__</nowiki>
 
| Removes the link beside the "edit" tab on pages in talk namespaces.
 
| {{mediawiki|rev:47522|1.15+}}
 
|-
 
|{{Hl3}} colspan="3"| '''Categories'''
 
|-
 
| <nowiki>__NOGALLERY__</nowiki>
 
| Used on a category page, replaces thumbnails in the category view with normal links.
 
| 1.7+
 
|-
 
| <nowiki>__HIDDENCAT__</nowiki>
 
| Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the [[Help:Preferences|user preferences]] to show them).<!-- hiddencategory hiddencat hide category categories -->
 
| 1.13+
 
|-
 
|{{Hl3}} colspan="3"| '''Language conversion'''
 
|-
 
| <nowiki>__NOCONTENTCONVERT__</nowiki><br /><nowiki>__NOCC__</nowiki>
 
| On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk.
 
|
 
|-
 
| <nowiki>__NOTITLECONVERT__</nowiki><br /><nowiki>__NOTC__</nowiki>
 
| On wikis with language variants, don't perform language conversion on the title (all other content is converted).
 
|
 
|-
 
|{{Hl3}} colspan="3"| '''Other'''
 
|-
 
| <nowiki>__START__</nowiki>
 
| No effect.
 
|
 
|-
 
| <nowiki>__END__</nowiki>
 
| Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace. Removed in {{mediawiki|rev:19213|19213}}.
 
| 1.1 - 1.8
 
|-
 
<nowiki>__INDEX__</nowiki>
 
| Tell search engines to index the page (overrides {{mediawiki|Manual:$wgArticleRobotPolicies|$wgArticleRobotPolicies}}, but not robots.txt).
 
| 1.14+
 
|-
 
|  <nowiki>__NOINDEX__</nowiki>
 
| Tell search engines not to index the page (ie, do not list in search engines' results).
 
| {{mediawiki|rev:37973|1.14+}}
 
|-
 
| <nowiki>__STATICREDIRECT__</nowiki>
 
| On redirect pages, don't allow MediaWiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title".
 
| {{mediawiki|rev:37928|1.13+}}
 
|}
 
  
==Variables==
+
If a page in the template namespace has the same name as a magic word, the magic word will be invoked instead. If you discover you absolutely have to define a template with the same name as a magic word, prefix the name of the template with "'''msg:'''" or the name of the template namespace ("'''Template:'''").  See below for further details if you need this feature.
Variables return information about the current page, wiki, or date. Their syntax is similar to [[Help:Templates|templates]]. Variables marked as "<span style="background:#FED;">'''[expensive]'''</span>" are tracked by the software, and the number that can be included on a page is limited.
 
  
If a template name conflicts with a variable, the variable will be used (so to transclude the template [[{{ns:10}}:PAGENAME]] you would need to write <code><tt><nowiki>{{</nowiki>{{ns:10}}:PAGENAME<nowiki>}}</nowiki></tt></code>). In some cases, adding parameters will force the parser to treat a variable as a template; for example, <code><tt><nowiki>{{CURRENTDAYNAME|x}}</nowiki></tt></code> transcludes [[{{ns:10}}:CURRENTDAYNAME]].
+
== Variables ==
  
===Date & time===
+
:''For details see [[Help:Variable]]''
The following variables return the current date and time in UTC.
 
  
Due to MediaWiki and browser caching, these variables frequently show when the page was ''cached'' rather than the current time.
+
=== Page names and related info ===
 +
{{H:Page name variables}}
  
{| {{prettytable}}
+
== Template modifiers ==
|-
+
{| class="wikitable" border="2" cellpadding="4" cellspacing="0"  
!{{Hl2}}| Variable
+
! Usage
!{{Hl2}}| Output
+
! Explanation
!{{Hl2}}| Description
 
!{{Hl2}}| Versions
 
|-
 
|{{Hl3}} colspan="4"| '''Year'''
 
|-
 
| <tt><nowiki>{{CURRENTYEAR}}</nowiki></tt>
 
| {{CURRENTYEAR}}
 
| Year
 
|
 
|-
 
|{{Hl3}} colspan="4"| '''Month'''
 
|-
 
| <tt><nowiki>{{CURRENTMONTH}}</nowiki></tt>
 
| {{CURRENTMONTH}}
 
| Month (zero-padded number)
 
|
 
|-
 
| <tt><nowiki>{{CURRENTMONTHNAME}}</nowiki></tt>
 
| {{CURRENTMONTHNAME}}
 
| Month (name)
 
|
 
|-
 
| <tt><nowiki>{{CURRENTMONTHNAMEGEN}}</nowiki></tt>
 
| {{CURRENTMONTHNAMEGEN}}
 
| Month ([[w:genitive|genitive form]])
 
|
 
|-
 
| <tt><nowiki>{{CURRENTMONTHABBREV}}</nowiki></tt>
 
| {{CURRENTMONTHABBREV}}
 
| Month (abbreviation)
 
| 1.5+
 
|-
 
|{{Hl3}} colspan="4"| '''Day'''
 
 
|-
 
|-
| <tt><nowiki>{{CURRENTDAY}}</nowiki></tt>
+
| <nowiki>{{:xyz}}</nowiki>
| {{CURRENTDAY}}
+
| A bare colon is not a template modifier, it's the prefix for the main namespace. Test e.g. article {&#123;:UTC&#125;} vs. template {&#123;UTC&#125;}.<br>Using this syntax you include the text of the main namespace article xyz in another article.
| Day of the month (unpadded number)
 
|
 
 
|-
 
|-
| <tt><nowiki>{{CURRENTDAY2}}</nowiki></tt>
+
| <nowiki>{{int:xyz}}</nowiki>
| {{CURRENTDAY2}}
+
| Same as <nowiki>{{MediaWiki:xyz}}</nowiki>, except standard message translation is applied depending on subpages and content/user/uselang language. Another difference is: this doesn't appear under "{{int:templatesused}}". Rendered as {{int:xyz}} if [[MediaWiki:xyz]] doesn't exist. See also [[Help:System message]].
| Day of the month (zero-padded number)
 
| 1.6+
 
 
|-
 
|-
| <tt><nowiki>{{CURRENTDOW}}</nowiki></tt>
+
| <nowiki>{{msg:xyz}}</nowiki>
| {{CURRENTDOW}}
+
| Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to <nowiki>{{template:xyz}}</nowiki>). Normally, magic words have priority when there is a conflict.
| Day of the week (unpadded number)
 
|
 
 
|-
 
|-
| <tt><nowiki>{{CURRENTDAYNAME}}</nowiki></tt>
+
| <nowiki>{{msgnw:xyz}}</nowiki>
| {{CURRENTDAYNAME}}
+
| The unexpanded wikitext is rendered (more or less, for details see [[Help:Template#msgnw|msgnw]]).
| Day of the week (name)
 
|
 
 
|-
 
|-
|{{Hl3}} colspan="4"| '''Time'''
+
| <nowiki>{{raw:xyz}}</nowiki>
 +
| '''[MW1.6+]''' Equivalent to <code><nowiki>{{msg:xyz}}</nowiki></code> above<ref>[http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=12925 Wikimedia SVN revision 12925]</ref>.
 
|-
 
|-
| <tt><nowiki>{{CURRENTTIME}}</nowiki></tt>
+
| <nowiki>{{subst:xyz}}</nowiki>
| {{CURRENTTIME}}
+
| In the wikitext, the tag is substituted by the ''content'' (single-level evaluation only), see [[Help:Substitution]].
| Time (24-hour HH:mm format)
+
|}{{-}}
|
 
|-
 
| <tt><nowiki>{{CURRENTHOUR}}</nowiki></tt>
 
| {{CURRENTHOUR}}
 
| Hour (24-hour zero-padded number)
 
|
 
|-
 
|{{Hl3}} colspan="4"| '''Other'''
 
|-
 
| <tt><nowiki>{{CURRENTWEEK}}</nowiki></tt>
 
| {{CURRENTWEEK}}
 
| Week (number)
 
|
 
|-
 
| <tt><nowiki>{{CURRENTTIMESTAMP}}</nowiki></tt>
 
| {{CURRENTTIMESTAMP}}
 
| YYYYMMDDHHmmss timestamp
 
| 1.7+
 
|}
 
  
The following variables do the same as the above, but using the site's server config or $wgLocaltimezone.
+
== Image modifiers ==
* <tt><nowiki>{{LOCALYEAR}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALMONTH}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALMONTHNAME}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALMONTHNAMEGEN}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALMONTHABBREV}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALDAY}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALDAY2}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALDOW}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALDAYNAME}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALTIME}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALHOUR}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALWEEK}}</nowiki></tt>
 
* <tt><nowiki>{{LOCALTIMESTAMP}}</nowiki></tt>
 
  
:''For more thorough time formatting, you may want to install [[Extension:ParserFunctions]] to use the [[Help:Extension:ParserFunctions#.23time|#time parser function]]''
+
:''For details see [[w:en:Wikipedia:Extended image syntax]].''
  
===Technical metadata===
+
These are [[Help:Image page|image]] modifiers used in <code><nowiki>[[File:title.ext|modifier|...|modifier]]</nowiki></code> links. Some are mutually exclusive, and then the last specified wins. The last unrecognized modifier is used as '''caption''' for [[w:framed image|''framed'' images]] or together with ''[[w:thumbnail|thumbnail]]s''. It's also used as description <tt>alt=</tt>''text''.
Revision variables return data about the '''latest edit to the current page''', even if viewing an older version of the page.
 
{| {{prettytable}}
 
|-
 
!{{Hl2}}| Variable
 
!{{Hl2}}| Output
 
!{{Hl2}}| Description
 
!{{Hl2}}| Versions
 
|-
 
|{{Hl3}} colspan="4"| '''Site'''
 
|-
 
| <tt><nowiki>{{SITENAME}}</nowiki></tt>
 
| {{SITENAME}}
 
| The wiki's site name ({{mediawiki|Manual:$wgSitename|$wgSitename}}).
 
|
 
|-
 
| <tt><nowiki>{{SERVER}}</nowiki></tt>
 
| {{SERVER}}
 
| domain URL ({{mediawiki|Manual:$wgServer|$wgServer}})
 
|
 
|-
 
| <tt><nowiki>{{SERVERNAME}}</nowiki></tt>
 
| {{SERVERNAME}}
 
| domain name (No longer dependent on {{mediawiki|Manual:$wgServerName|$wgServerName}} as of version 1.17)
 
|
 
|-
 
| <tt><nowiki>{{DIRMARK}}</nowiki></tt><br /><tt><nowiki>{{DIRECTIONMARK}}</nowiki></tt>
 
| {{DIRMARK}}<br />{{DIRECTIONMARK}}
 
| Outputs a unicode-directional mark that matches the wiki's default language's direction (<code>&amp;lrm;</code> on left-to-right wikis, <code>&amp;rlm;</code> on right-to-left wikis), useful in text with multi-directional text.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{SCRIPTPATH}}</nowiki></tt>
 
| {{SCRIPTPATH}}
 
| relative script path ({{mediawiki|Manual:$wgScriptPath|$wgScriptPath}})
 
|
 
|-
 
| <tt><nowiki>{{STYLEPATH}}</nowiki></tt>
 
| {{STYLEPATH}}
 
| relative style path ({{mediawiki|Manual:$wgStylePath|$wgStylePath}})
 
| 1.16+
 
|-
 
| <tt><nowiki>{{CURRENTVERSION}}</nowiki></tt>
 
| {{CURRENTVERSION}}
 
| The wiki's MediaWiki version.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{CONTENTLANGUAGE}}</nowiki></tt><br /><tt><nowiki>{{CONTENTLANG}}</nowiki></tt>
 
| {{CONTENTLANGUAGE}}<br />{{CONTENTLANG}}
 
| The wiki's default interface language ({{mediawiki|Manual:$wgLanguageCode|$wgLanguageCode}})
 
| 1.7+
 
|-
 
|{{Hl3}} colspan="4"| '''Latest revision to current page'''
 
|-
 
| <tt><nowiki>{{REVISIONID}}</nowiki></tt>
 
| {{REVISIONID}}
 
| Unique revision ID
 
| 1.5+
 
|-
 
| <tt><nowiki>{{REVISIONDAY}}</nowiki></tt>
 
| {{REVISIONDAY}}
 
| Day edit was made (unpadded number)
 
| 1.8+
 
|-
 
| <tt><nowiki>{{REVISIONDAY2}}</nowiki></tt>
 
| {{REVISIONDAY2}}
 
| Day edit was made (zero-padded number)
 
| 1.8+
 
|-
 
| <tt><nowiki>{{REVISIONMONTH}}</nowiki></tt>
 
| {{REVISIONMONTH}}
 
| Month edit was made (zero-padded number as of {{mediawiki|rev:66200|1.17+}}, unpadded number in prior versions)
 
| 1.8+
 
|-
 
| <tt><nowiki>{{REVISIONYEAR}}</nowiki></tt>
 
| {{REVISIONYEAR}}
 
| Year edit was made
 
| 1.8+
 
|-
 
| <tt><nowiki>{{REVISIONTIMESTAMP}}</nowiki></tt>
 
| {{REVISIONTIMESTAMP}}
 
| Timestamp as of time of edit
 
| 1.8+
 
|-
 
| <tt><nowiki>{{REVISIONUSER}}</nowiki></tt>
 
| {{REVISIONUSER}}
 
| The username of the user who made the most recent edit to the page, or the current user when previewing an edit
 
| {{mediawiki|rev:48149|1.15+}}
 
|-style="background:#FED;"
 
| <tt><nowiki>{{PAGESIZE:</nowiki>''page name''<nowiki>}}</nowiki></tt>
 
| {{PAGESIZE:Help:Magic_words}}
 
| '''[expensive]''' Returns the byte size of the specified page.
 
| {{mediawiki|rev:33551|1.13+}}
 
|-
 
| <tt><nowiki>{{PROTECTIONLEVEL:</nowiki>''action''<nowiki>}}</nowiki></tt>
 
| protection level
 
| Outputs the protection level (e.g. 'autoconfirm', 'sysop') for a given action (e.g. 'edit', 'move') on the current page or an empty string if not protected.
 
| {{mediawiki|rev:45587|1.15+}}
 
|-
 
|{{Hl3}} colspan="4"| '''Affects page content'''
 
|-
 
| <tt><nowiki>{{DISPLAYTITLE:</nowiki>''title''<nowiki>}}</nowiki></tt>
 
|
 
| Format the current page's title header. The value must be equivalent to the default title: only capitalization changes and replacing spaces with underscores. It can be disabled or enabled by {{mediawiki|Manual:$wgAllowDisplayTitle|$wgAllowDisplayTitle}}; disabled by default before 1.10+, enabled by default thereafter.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{DEFAULTSORTKEY:</nowiki>''sortkey''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{DEFAULTCATEGORYSORT:</nowiki>''sortkey''<nowiki>}}</nowiki></tt>
 
|
 
| Used for categorizing pages, sets a default [[Help:Categories|category sort key]]. For example if you put <tt><nowiki>{{DEFAULTSORT:Smith, John}}</nowiki></tt> at the end of [[John Smith]], the page would be sorted under "S" by default in categories.
 
| 1.10+
 
|}
 
  
===Statistics===
+
=== Size ===
Numbers returned by these variables normally contain separators (commas or spaces, depending on the local language), but can return raw numbers with the ":R" flag (for example, <code><tt><nowiki>{{NUMBEROFPAGES}}</nowiki></tt></code> &rarr; {{NUMBEROFPAGES}} and <code><tt><nowiki>{{NUMBEROFPAGES:R}}</nowiki></tt></code> &rarr; {{NUMBEROFPAGES:R}}). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example <code><tt><nowiki>{{PAGESINCATEGORY:Help}}</nowiki></tt></code> and <code><tt><nowiki>{{PAGESINCATEGORY:Help|R}}</nowiki></tt></code>).
 
{| {{prettytable}}
 
|-
 
!{{Hl2}}| Variable
 
!{{Hl2}}| Output
 
!{{Hl2}}| Description
 
!{{Hl2}}| Versions
 
|-
 
|{{Hl3}} colspan="4"| '''Entire wiki'''
 
|-
 
| <tt><nowiki>{{NUMBEROFPAGES}}</nowiki></tt>
 
| {{NUMBEROFPAGES}}
 
| Number of wiki pages.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{NUMBEROFARTICLES}}</nowiki></tt>
 
| {{NUMBEROFARTICLES}}
 
| Number of pages in {{mediawiki|Manual:Using custom namespaces#Content namespaces|content namespaces}}.
 
|
 
|-
 
| <tt><nowiki>{{NUMBEROFFILES}}</nowiki></tt>
 
| {{NUMBEROFFILES}}
 
| Number of uploaded files.
 
| 1.5+
 
|-
 
| <tt><nowiki>{{NUMBEROFEDITS}}</nowiki></tt>
 
| {{NUMBEROFEDITS}}
 
| Number of page edits.
 
| {{mediawiki|rev:21319|1.10+}}
 
|-
 
| <tt><nowiki>{{NUMBEROFVIEWS}}</nowiki></tt>
 
| {{NUMBEROFVIEWS}}
 
| Number of page views. Usually useless on a wiki using [[Manual:Cache|caching]].
 
| {{mediawiki|rev:42721|1.14+}}
 
|-
 
| <tt><nowiki>{{NUMBEROFUSERS}}</nowiki></tt>
 
| {{NUMBEROFUSERS}}
 
| Number of registered users.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{NUMBEROFADMINS}}</nowiki></tt>
 
| {{NUMBEROFADMINS}}
 
| Number of users in the ''sysop'' {{mediawiki|Manual:User rights|group}}.
 
| 1.7+
 
|-
 
| <tt><nowiki>{{NUMBEROFACTIVEUSERS}}</nowiki></tt>
 
| {{NUMBEROFACTIVEUSERS}}
 
| Number of active users, based on the criteria used in [[Special:Statistics]].
 
| {{mediawiki|rev:47392|1.15+}}
 
|-style="background:#FED;"
 
| <tt><nowiki>{{PAGESINCATEGORY:</nowiki>''categoryname''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{PAGESINCAT:Help}}</nowiki></tt>
 
| {{PAGESINCATEGORY:Help}}<br />{{PAGESINCAT:Help}}
 
| '''[expensive]''' Number of pages in the given [[Help:Categories|category]].
 
| {{mediawiki|rev:32932|1.13+}}
 
|-
 
| <tt><nowiki>{{NUMBERINGROUP:</nowiki>''groupname''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{NUMINGROUP:</nowiki>''groupname''<nowiki>}}</nowiki></tt>
 
| {{NUMBERINGROUP:bureaucrat}}<br />{{NUMINGROUP:bureaucrat}}<br /><small><nowiki>({{NUMBERINGROUP:bureaucrat}} used here)</nowiki></small>
 
| Number of users in a specific {{mediawiki|Manual:User rights|group}}.
 
| {{mediawiki|rev:40116|1.14+}}
 
|-
 
| <tt><nowiki>{{PAGESINNS:</nowiki>''index''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{PAGESINNAMESPACE:</nowiki>''index''<nowiki>}}</nowiki></tt>
 
| ''not enabled''
 
| Number of pages in the given [[Help:Namespaces|namespace]] (replace ''index'' with the relevant [[Manual:Namespace|namespace index]]). For instance, <tt><nowiki>{{PAGESINNAMESPACE:</nowiki>''14''<nowiki>}}</nowiki></tt> will output the number of category pages. <tt><nowiki>{{PAGESINNS:0}}</nowiki></tt> differs from <tt><nowiki>{{NUMBEROFARTICLES}}</nowiki></tt> in that the former includes redirects and disambiguation pages. Disabled by default, enable with {{mediawiki|Manual:$wgAllowSlowParserFunctions|$wgAllowSlowParserFunctions}}.
 
| 1.7+
 
|}
 
  
===Page names===
+
{| class="wikitable" border="2" cellpadding="4" cellspacing="0"
{| {{prettytable}}
+
! Word
|-
+
! Usage
!{{Hl2}}| Variable
+
! Explanation
!{{Hl2}}| Output
 
!{{Hl2}}| Description
 
!{{Hl2}}| Versions
 
 
|-
 
|-
| <tt><nowiki>{{FULLPAGENAME}}</nowiki></tt>
+
| framed <br/>frame <br/>enframed
| {{FULLPAGENAME}}
+
| <code><nowiki>[[File:Mediawiki.png|framed]]</nowiki></code>
| Namespace and page title.
+
| Places an image in a ''frame'' with a description. Uses original size and stubbornly ignores width parameter if given. <br/>In general, far better to use thumb, as is only suitable for small images.
| 1.6+
 
 
|-
 
|-
| <tt><nowiki>{{PAGENAME}}</nowiki></tt>
+
| border
| {{PAGENAME}}
+
| <code><nowiki>[[File:Mediawiki.png|border]]</nowiki></code>
| Page title.
+
| Shows a 1 pixel border around the image.
|
 
 
|-
 
|-
| <tt><nowiki>{{BASEPAGENAME}}</nowiki></tt>
+
| thumbnail <br/>thumb
| {{BASEPAGENAME}}
+
| <code><nowiki>[[File:Mediawiki.png|thumbnail]]</nowiki></code>
| Page title excluding the current [[Help:Subpages|subpage]] and namespace ("Title/foo" on "Title/foo/bar").
+
| Modifies image size, sets it dependent on user's favorite thumbnail size in one's preferences, or on the given width parameter (see hereafter).
For more complex splitting, use <nowiki>{{</nowiki>[[Help:Extension:ParserFunctions#.23titleparts|#titleparts:]] <nowiki>}}</nowiki> from [[Help:Extension:ParserFunctions|ParserFunctions extension]].
 
| 1.7+
 
 
|-
 
|-
| <tt><nowiki>{{SUBPAGENAME}}</nowiki></tt>
+
| thumb=''xyz''
| {{SUBPAGENAME}}
+
| <code><nowiki>[[File:Mediawiki.png|thumb=Wiki.png]]</nowiki></code>
| The [[Help:Subpages|subpage]] title ("foo" on "Title/foo").
+
| Manual thumbnail: instead of displaying an automatically-sized thumbnail for <var>Mediawiki.png</var>, display the image <var>Wiki.png</var>.
| 1.6+
+
|-valign="top"
|-
+
| ''width'' px <br/>100x200px
| <tt><nowiki>{{SUBJECTPAGENAME}}</nowiki></tt>
+
| <code><nowiki>[[File:Mediawiki.png|40px]]</nowiki></code> <br/><code><nowiki>[[File:Mediawiki.png|100x200px]]</nowiki></code>
| {{SUBJECTPAGENAME}}
+
| Scales image to given ''width''&#160; in pixels. <br/>Scales image to no more than 100 pixels wide and no more than 200 high, but image scaled to retain its true aspect ratio within the boundary specified.
| The namespace and title of the associated content page.
+
|}{{-}}
| 1.7+
 
|-
 
| <tt><nowiki>{{TALKPAGENAME}}</nowiki></tt>
 
| {{TALKPAGENAME}}
 
| The namespace and title of the associated talk page.
 
| 1.7+
 
|}
 
  
The <tt><nowiki>{{BASEPAGENAME}}</nowiki></tt> and <tt><nowiki>{{SUBPAGENAME}}</nowiki></tt> magic words only work in namespaces that have subpages enabled.  See {{mediawiki|Manual:$wgNamespacesWithSubpages}} for information on enabling subpages.
+
=== Position ===
  
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters [[w:percent-encoding|percent-encoded]]):
+
:''For details see [[Help:Images and other uploaded files]].''
* <tt><nowiki>{{FULLPAGENAMEE}}</nowiki></tt>
 
* <tt><nowiki>{{PAGENAMEE}}</nowiki></tt>
 
* <tt><nowiki>{{BASEPAGENAMEE}}</nowiki></tt>
 
* <tt><nowiki>{{SUBPAGENAMEE}}</nowiki></tt>
 
* <tt><nowiki>{{SUBJECTPAGENAMEE}}</nowiki></tt>
 
* <tt><nowiki>{{TALKPAGENAMEE}}</nowiki></tt>
 
  
As of {{mediawiki|rev:46662|1.15+}}, these can all take a parameter, allowing specification of the page to be operated on, instead of just the current page:
+
The positions are mutually exclusive; the last specified wins. [[Template:Clear]] can stop floating. For inline images only modifier ''px'' (see hereinbefore) is supported.
* <tt><nowiki>{{PAGENAME:Template:Main Page}}</nowiki></tt> &rarr; '''{{PAGENAME:Template:Main Page}}'''
 
  
 
+
{| class="wikitable" width="100%"
{{Warning|Page titles containing certain characters, such as single quotes (') or asterisks <tt>*</tt>, may produce unexpected results when handled with these magic words, e.g. <tt><nowiki>{{PAGESINCATEGORY:{{PAGENAME}}}}</nowiki></tt>. See bugs {{mediawiki|bugzilla:14779|14779}}, {{mediawiki|bugzilla:16474|16474}}.}}
+
! Word
 
+
! Usage
===Namespaces===
+
! Explanation
{| {{prettytable}}
 
 
|-
 
|-
!{{Hl2}}| Variable
+
| right
!{{Hl2}}| Output
+
| <code><nowiki>[[File:Mediawiki.png|right]]</nowiki></code>
!{{Hl2}}| Description
+
| Sets top of image to the right margin, text will flow from the left.
!{{Hl2}}| Versions
 
 
|-
 
|-
| <tt><nowiki>{{NAMESPACE}}</nowiki></tt>
+
| <nowiki>left</nowiki>
| {{NAMESPACE}}
+
| <code><nowiki>[[File:Mediawiki.png|left]]</nowiki></code>
| Name of the page's namespace
+
| Sets top of image to the left margin, content text will flow from the right.
|
 
 
|-
 
|-
| <tt><nowiki>{{SUBJECTSPACE}}</nowiki></tt><br /><tt><nowiki>{{ARTICLESPACE}}</nowiki></tt>
+
| <nowiki>none</nowiki>
| {{SUBJECTSPACE}}<br />{{ARTICLESPACE}}
+
| <code><nowiki>[[File:Mediawiki.png|none]]</nowiki></code>
| Name of the associated content namespace
+
| Image will be alone at left, content text will not appear with image.
| 1.7+
 
 
|-
 
|-
| <tt><nowiki>{{TALKSPACE}}</nowiki></tt>
+
| center <br />centre
| {{TALKSPACE}}
+
| <code><nowiki>[[File:Mediawiki.png|center]]</nowiki></code>
| Name of the associated talk namespace
+
| Like ''none'' with image centered.
| 1.7+
+
|}{{-}}
|}
 
  
The following are equivalents encoded for use in MediaWiki URLs (spaces replaced with underscores and some characters percent-encoded):
+
== Miscellany ==
* <tt><nowiki>{{NAMESPACEE}}</nowiki></tt>
 
* <tt><nowiki>{{SUBJECTSPACEE}}</nowiki></tt>
 
* <tt><nowiki>{{TALKSPACEE}}</nowiki></tt>
 
  
As of {{mediawiki|rev:46630|1.15+}}, these can take a page name parameter and will return the namespace of the page name parameter, instead of the current page's:
+
{| class="wikitable" border="2" cellpadding="4" cellspacing="0"
* <tt><nowiki>{{NAMESPACE:Template:Main Page}}</nowiki></tt> &rarr; '''{{NAMESPACE:Template:Main Page}}'''
+
! Word
* <tt><nowiki>{{SUBJECTSPACE:Template:Main Page}}</nowiki></tt> &rarr; '''{{SUBJECTSPACE:Template:Main Page}}'''
+
! Example
* <tt><nowiki>{{TALKSPACE:Template:Main Page}}</nowiki></tt> &rarr; '''{{TALKSPACE:Template:Main Page}}'''
+
! Explanation
 
 
==Parser functions==
 
 
 
Parser functions are very similar to variables, but take one or more parameters (technically, any magic word that takes a parameter is a parser function), and the name is sometimes prefixed with a hash to distinguish them from templates.
 
 
 
This page only describes parser functions that are integral to the MediaWiki software. Other parser functions may be added by MediaWiki extensions such as the {{mediawiki|Extension:ParserFunctions|ParserFunctions extension}}. For those see [[Help:Extension:ParserFunctions]].
 
 
 
===URL data===
 
{| {{prettytable}}
 
 
|-
 
|-
!{{Hl2}}| Parser function
+
| <nowiki>{{DISPLAYTITLE:</nowiki>''xyz''<nowiki>}}</nowiki>
!{{Hl2}}| Input → Output
+
| ''no inline output''
!{{Hl2}}| Description
+
| '''[MW 1.7+]''' Modify the page's title [http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=13572], enabled in Wikimedia projects since June 2007 ([http://svn.wikimedia.org/viewvc/mediawiki?view=rev&revision=23393]). Also see {{h:mwg|AllowDisplayTitle}}.
!{{Hl2}}| Versions
 
 
|-
 
|-
| <tt><nowiki>{{localurl:</nowiki>''page name''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{localurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></tt>
+
| <nowiki>{{DIRMARK}}</nowiki><br /><nowiki>{{DIRECTIONMARK}}</nowiki>
| <nowiki>{{localurl:MediaWiki}}</nowiki> → {{localurl:MediaWiki}}<br /><nowiki>{{localurl:MediaWiki|printable=yes}}</nowiki> → {{localurl:MediaWiki|printable=yes}}
+
| <code>{{DIRMARK}}</code><br /><code>{{DIRECTIONMARK}}</code>
| The relative path to the title.  
+
| '''[MW 1.7+]''' U+200E left-to-right or U+200D right-to-left mark.
|
 
 
|-
 
|-
| <tt><nowiki>{{fullurl:</nowiki>''page name''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{fullurl:</nowiki>''page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{fullurl:</nowiki>''interwiki:remote page name''<nowiki>|</nowiki>''query_string''<nowiki>}}</nowiki></tt>
+
| <nowiki>{{CONTENTLANGUAGE}}</nowiki>
| <nowiki>{{fullurl:Category:Top level}}</nowiki> → {{fullurl:Category:Top level}}<br />
+
| <code>{{CONTENTLANGUAGE}}</code>
<nowiki>{{fullurl:Category:Top level|action=edit}}</nowiki> → {{fullurl:Category:Top level|action=edit}}
+
| '''[MW 1.7+]''' Code of the site's default interface language ({{h:mwg|LanguageCode}}).
| The absolute path to the title. This will also resolve [[Manual:Interwiki|Interwiki]] prefixes.
 
| 1.5+
 
 
|-
 
|-
| <tt><nowiki>{{filepath:</nowiki>''file name''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{filepath:</nowiki>''file name''<nowiki>|nowiki}}</nowiki></tt>
+
| <nowiki>{{DEFAULTSORT:xyz}}</nowiki>
| <nowiki>{{filepath:Wiki.png}}</nowiki> → {{filepath:Wiki.png}}<br /><nowiki>{{filepath:Wiki.png|nowiki}}</nowiki> → {{filepath:Wiki.png|nowiki}}
+
| ''no inline output''
| The absolute URL to a media file.
+
| '''[MW 1.10+]''' Sets a default [[Help:Categories#Sort_key|category sort key]] for the whole current page (also applying for category tags before this tag)<ref>"[[w:Wikipedia:Wikipedia Signpost/2007-01-02/Technology report|Technology report]]", English Wikipedia Signpost, January 2007</ref>.
| {{mediawiki|rev:25854|1.12+}}
 
 
|-
 
|-
| <tt><nowiki>{{urlencode:</nowiki>''string''<nowiki>}}</nowiki></tt> (or <tt><nowiki>{{urlencode:</nowiki>''string''<nowiki>|QUERY}}</nowiki></tt>)<br /><tt><nowiki>{{urlencode:</nowiki>''string''<nowiki>|WIKI}}</nowiki></tt><br /><tt><nowiki>{{urlencode:</nowiki>''string''<nowiki>|PATH}}</nowiki></tt>
+
| <nowiki>#REDIRECT</nowiki>  
| <nowiki>{{urlencode:x y z á é}} (or {{urlencode:x y z á é|QUERY}})</nowiki> → {{urlencode:x y z á é}}<br /><nowiki>{{urlencode:x y z á é|WIKI}}</nowiki> → x_y_z_%C3%A1_%C3%A9<br /><nowiki>{{urlencode:x y z á é|PATH}}</nowiki> → x%20y%20z%20%C3%A1%20%C3%A9
+
| <code>#REDIRECT&#160;[&#91;target&#93;]</code><br />at top of source page
| The input encoded for use in URLs.
+
| Creates a [[Help:Redirect|redirect]] to another page (to the target page).
| {{mediawiki|rev:14273|1.7+}} (or {{mediawiki|rev:64726|1.17+}})<br />{{mediawiki|rev:64726|1.17+}}<br />{{mediawiki|rev:64726|1.17+}}
+
|}{{-}}
|-
+
 
| <tt><nowiki>{{anchorencode:</nowiki>''string''<nowiki>}}</nowiki></tt>
+
Despite its name <tt>MAGICNUMBER</tt> is no magic word, the [[m:Help:ISBN links|ISBN]] magic works only on the [[{{ns:4}}:{{int:Booksources}}|{{ns:8}}:Booksources]] page used by [[Special:Booksources]], but talking about <tt><nowiki>[[{{ns:4}}:{{int:Booksources}}|{{ns:8}}:Booksources]]</nowiki></tt> in a way working on any MediaWiki installation is esoteric enough to be noted here.
| <nowiki>{{anchorencode:x y z á é}}</nowiki> → {{anchorencode:x y z á é}}
 
| The input encoded for use in URL section anchors (after the '#' symbol in a URL).
 
| {{mediawiki|rev:16279|1.8+}}
 
|}
 
  
===Namespaces===
+
===Language-dependent word conversions===
<tt><nowiki>{{ns:}}</nowiki></tt> returns the localized name for the [[Help:Namespace|namespace]] with that index. <tt><nowiki>{{nse:}}</nowiki></tt> is the equivalent encoded for MediaWiki URLs. It does the same, but it replaces spaces with underscores, making it usable in external links.
+
{| class="wikitable" border="2" cellpadding="4" cellspacing="0"
{| {{prettytable}}
+
! Word
 +
! Example
 +
! Explanation
 
|-
 
|-
! {{hl3}} colspan="2" width="50%" | Content namespaces
+
| <nowiki>{{CURRENTMONTHNAMEGEN}}</nowiki>
! rowspan="12" |
+
| <code>{{CURRENTMONTHNAMEGEN}}</code>
! {{hl3}} colspan="2" width=%50%" | Talk namespaces
+
| [[w:genitive case|Genitive form]] of month name used for Czech, Polish, Ukrainian[http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/]
 
|-
 
|-
!{{Hl2}}| Usage
+
| <nowiki>{{LOCALMONTHNAMEGEN}}</nowiki>
!{{Hl2}}| Output
+
| <code>{{LOCALMONTHNAMEGEN}}</code>
!{{Hl2}}| Usage
+
| [[w:genitive case|Genitive form]] of month name used for Czech, Polish, Ukrainian (local time)
!{{Hl2}}| Output
 
 
|-
 
|-
| <tt><nowiki>{{ns:-2}}</nowiki></tt> or <tt><nowiki>{{ns:Media}}</nowiki></tt>
+
| {&#123;grammar:''case &#124; word'' &#125;}
| {{ns:-2}} || ||
+
| <nowiki>{{grammar:7sg|Wikipedie}}</nowiki><br />on [[:cs:]] is <code>Wikipedií</code>.
 +
| Derived word forms in inflected languages like [[:cs:|Czech]] [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageCs.php]
 
|-
 
|-
| <tt><nowiki>{{ns:-1}}</nowiki></tt> or <tt><nowiki>{{ns:Special}}</nowiki></tt>
+
| {&#123;plural:''count &#124;form1 &#124;form2'' &#125;}<br />{&#123;plural:''count&#160;&#124;1st&#160;&#124;&#160;2nd&#160;&#124;&#160;3rd&#160;''&#125;}  
| {{ns:-1}} || ||
+
| <nowiki>{{plural: 2 | is | are }}</nowiki><br />outputs <code>{{plural: 2 | is |are }}</code><br /><nowiki>{{plural: 1 | this | these }}</nowiki><br />outputs <code>{{plural: 1 |this | these }}</code><br /><nowiki>{{plural: 0 | his | their }}</nowiki><br />outputs <code>{{plural: 0 |his | their }}</code>
|-
+
| ''count'' '''1''' yields ''form1'' (singular), [[w:Plural|plural]] transformations are used for languages like [[:ru:|Russian]] [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageRu.php] based on "count mod 10".
| <tt><nowiki>{{ns:0}}</nowiki></tt> or <tt><nowiki>{{ns:}}</nowiki></tt>
+
|}{{-}}
| {{ns:}}
+
 
| <tt><nowiki>{{ns:1}}</nowiki></tt> or <tt><nowiki>{{ns:Talk}}</nowiki></tt>
+
"Grammar" and "Plural" are language-dependent functions, defined in [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageCs.php], [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageRu.php], etc. (note that in PHP, the modulo operator is the percent sign).
| {{ns:1}}
 
|-
 
| <tt><nowiki>{{ns:2}}</nowiki></tt> or <tt><nowiki>{{ns:User}}</nowiki></tt>
 
| {{ns:2}}
 
| <tt><nowiki>{{ns:3}}</nowiki></tt> or <tt><nowiki>{{ns:User talk}}</nowiki></tt>
 
| {{ns:3}}
 
|-
 
| <tt><nowiki>{{ns:4}}</nowiki></tt> or <tt><nowiki>{{ns:Project}}</nowiki></tt>
 
| {{ns:4}}
 
| <tt><nowiki>{{ns:5}}</nowiki></tt> or <tt><nowiki>{{ns:Project talk}}</nowiki></tt>
 
| {{ns:5}}
 
|-
 
| <tt><nowiki>{{ns:6}}</nowiki></tt> or <tt><nowiki>{{ns:File}}</nowiki></tt> or <tt><nowiki>{{ns:Image}}</nowiki></tt>
 
| {{ns:6}}
 
| <tt><nowiki>{{ns:7}}</nowiki></tt> or <tt><nowiki>{{ns:File talk}}</nowiki></tt> or <tt><nowiki>{{ns:Image talk}}</nowiki></tt>
 
| {{ns:7}}
 
|-
 
| <tt><nowiki>{{ns:8}}</nowiki></tt> or <tt><nowiki>{{ns:MediaWiki}}</nowiki></tt>
 
| {{ns:8}}
 
| <tt><nowiki>{{ns:9}}</nowiki></tt> or <tt><nowiki>{{ns:MediaWiki talk}}</nowiki></tt>
 
| {{ns:9}}
 
|-
 
| <tt><nowiki>{{ns:10}}</nowiki></tt> or <tt><nowiki>{{ns:Template}}</nowiki></tt>
 
| {{ns:10}}
 
| <tt><nowiki>{{ns:11}}</nowiki></tt> or <tt><nowiki>{{ns:Template talk}}</nowiki></tt>
 
| {{ns:11}}
 
|-
 
| <tt><nowiki>{{ns:12}}</nowiki></tt> or <tt><nowiki>{{ns:Help}}</nowiki></tt>
 
| {{ns:12}}
 
| <tt><nowiki>{{ns:13}}</nowiki></tt> or <tt><nowiki>{{ns:Help talk}}</nowiki></tt>
 
| {{ns:13}}
 
|-
 
| <tt><nowiki>{{ns:14}}</nowiki></tt> or <tt><nowiki>{{ns:Category}}</nowiki></tt>
 
| {{ns:14}}
 
| <tt><nowiki>{{ns:15}}</nowiki></tt> or <tt><nowiki>{{ns:Category talk}}</nowiki></tt>
 
| {{ns:15}}
 
|}
 
  
===Formatting===
+
"Grammar" can either be applied to predefined words only, or to arbitrary words, depending on whether the definition is just a 2D array, or involves string manipulations. See also [[:cs:Šablona:Wikivar/GRAMMAR]].
<!--Well gosh, with the source of the examples hidden, who can tell what you are inputting without looking here in the source?-->
 
{| {{prettytable}}
 
!{{Hl2}}| Usage
 
!{{Hl2}}| Input → Output
 
!{{Hl2}}| Description
 
!{{Hl2}}| Version
 
|-
 
|-
 
| <tt><nowiki>{{lc:</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{lc:DATA CENTER}}</nowiki></tt> → {{lc:DATA CENTER}}
 
| The lowercase input.
 
| 1.5+
 
|-
 
| <tt><nowiki>{{lcfirst:</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{lcfirst:DATA center}}</nowiki></tt> → {{lcfirst:DATA center}}
 
| The input with the <u>very first</u> character lowercase.
 
| 1.5+
 
|-
 
| <tt><nowiki>{{uc:</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{uc:text transform}}</nowiki></tt> → {{uc:text transform}}
 
| The uppercase input.
 
| 1.5+
 
|-
 
| <tt><nowiki>{{ucfirst:</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{ucfirst:text TRANSFORM}}</nowiki></tt> → {{ucfirst:text TRANSFORM}}
 
| The input with the <u>very first</u> character uppercase.
 
| 1.5+
 
|-
 
| <tt><nowiki>{{formatnum:</nowiki>''unformatted&nbsp;num''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{formatnum:</nowiki>''formatted&nbsp;num''<nowiki>|R}}</nowiki></tt>
 
| <tt><nowiki>{{formatnum:987654321.654321}}</nowiki></tt><br/> → {{formatnum:987654321.654321}}<br /> <tt><nowiki>{{formatnum:987,654,321.654321|R}}</nowiki></tt><br/> → {{formatnum:987,654,321.654321|R}}
 
| The input with decimal and decimal group separators, and localized digit script, according to the wiki's default locale. The <tt><nowiki>|</nowiki>R</tt> parameter can be used to unformat a number, for use in mathematical situations.
 
| 1.7+<br />{{mediawiki|rev:32012|1.13+}}
 
|-
 
|
 
<code><nowiki>{{#dateformat:</nowiki>''date''<nowiki>}}
 
{{#formatdate:</nowiki>''date''<nowiki>}}
 
{{#dateformat:</nowiki>''date''{{!}}''format''<nowiki>}}
 
{{#formatdate:</nowiki>''date''{{!}}''format''<nowiki>}}</nowiki></code>
 
|
 
<tt><nowiki>{{#dateformat:25 deC 2009|ymd}}</nowiki></tt><br/>
 
→ {{#dateformat:25 deC 2009|ymd}} (your pref),  2009 DeC 25 (default)<br/>
 
<tt><nowiki>{{#formatdate:dec 25,2009|dmy}}</nowiki></tt><br/>
 
→ {{#formatdate:dec 25,2009|dmy}} (your pref), 25 Dec 2009 (default)<br/>
 
<tt><nowiki>{{#dateformat:2009-12-25|mdy}}</nowiki></tt><br/>
 
→ {{#dateformat:2009-12-25|mdy}} (your pref), December 25, 2009 (default)<br/>
 
<tt><nowiki>{{#formatdate:2009 dec 25|ISO 8601}}</nowiki></tt><br/>
 
→ {{#formatdate:2009 dec 25|ISO 8601}} (your pref), 2009-12-25 (default)<br/>
 
<tt><nowiki>{{#dateformat:25 decEmber|mdy}}</nowiki></tt><br/>
 
→ {{#dateformat:25 decEmber|mdy}} (your pref), DecEmber 25 (default)<br/>
 
  
 +
"Plural" is a site-language-dependent switch function, controlled by function convertPlural in Language.php (which distinguishes between 1 and "not 1"), for some languages overridden in Languagexx.php, e.g. for French (which distinguishes between <=1 and >1) and Russian, which uses a grammar case for amounts ending in 1 (1, 21, 31,...), another case for amounts ending in 2 to 4 (2, 3, 4, 22, 23, 24, ...) and still another case for the remaining quantities.
  
Note: In the example above, "your pref" refers to your date preference on the current MediaWiki wiki only.
+
As opposed to [[ParserFunctions]], "plural" accepts points and commas in numbers and interprets them in a site-language-specific way (depending on $separatorTransformTable in Messagesxx.php); on this site:
| Formats an unlinked date based on user "Date format" preference, and adds metadata tagging it as a formatted date. For logged-out users and those who have not set a date format in their preferences, dates can be given a default: <tt>mdy</tt>, <tt>dmy</tt>, <tt>ymd</tt>, <tt>ISO&nbsp;8601</tt> (all case sensitive). If only the month and day are given, only <tt>mdy</tt> and <tt>dmy</tt> are valid. If a format is not specified or is invalid, the input format is used as a default. If the supplied date is not recognized as a valid date (specifically, if it contains any metadata such as from a nested use of these or a similar template), it is rendered unchanged, and no (additional) metadata is generated.<br/><small>{{warning}}Although the ISO 8601 standard requires that dates be in the Gregorian calendar, the ISO parameter in this function will still format dates that fall outside the usual Gregorian range (e.g. dates prior to 1583). Also, the magic word cannot properly convert between negative years (used with ISO 8601) and years BC or years BCE (used in general writing).</small>
+
*<nowiki>{{plural:1.000|a|b|c}}</nowiki> gives {{plural:1.000|a|b|c}}
| {{mediawiki|rev:48249|1.15+}}
+
*<nowiki>{{plural:1,000|a|b|c}}</nowiki> gives {{plural:1,000|a|b|c}}
|-
 
| <tt><nowiki>{{padleft:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{padleft:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{padleft:xyz|5}}</nowiki></tt> → {{padleft:xyz|5}}<br /> <tt><nowiki>{{padleft:xyz|5|_}}</nowiki></tt> → {{padleft:xyz|5|_}} <tt><nowiki>{{padleft:xyz|5|abc}}</nowiki></tt> → {{padleft:xyz|5|abc}} <tt><nowiki>{{padleft:xyz|2}}</nowiki></tt> → {{padleft:xyz|2}}<br /> <tt><nowiki>{{padleft:|1|xyz}}</nowiki></tt> → {{padleft:|1|xyz}} (first character of the string)<br />
 
| Inserts a string of padding characters (character chosen in third parameter; default '0') of a specified length (second parameter) next to a chosen base character or variable (first parameter). The final digits or characters in the base replace the final characters in the padding; i.e. <nowiki>{{padleft:44|3|0}}</nowiki> produces {{padleft:44|3}}. The padding string may be truncated if its length does not evenly divide the required number of characters.<br />'''{{mediawiki|bugzilla:16852|bug}} (fixed in {{mediawiki|rev:45734|r45734}}):''' multibyte characters are interpreted as two characters, which can skew width. These also cannot be used as padding characters.
 
| 1.8+
 
|-
 
| <tt><nowiki>{{padright:xyz|</nowiki>''stringlength''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''char''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{padright:xyz|</nowiki>''strlen''<nowiki>|</nowiki>''string''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{padright:xyz|5}}</nowiki></tt> → {{padright:xyz|5}}<br /> <tt><nowiki>{{padright:xyz|5|_}}</nowiki></tt> → {{padright:xyz|5|_}} <tt><nowiki>{{padright:xyz|5|abc}}</nowiki></tt> → {{padright:xyz|5|abc}} <tt><nowiki>{{padright:xyz|2}}</nowiki></tt> → {{padright:xyz|2}}<br />
 
| Identical to padleft, but adds padding characters to the right side.
 
|
 
|-
 
| <tt><nowiki>{{plural:2|</nowiki>''is''<nowiki>|</nowiki>''are''<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{plural:1|is|are}}</nowiki></tt> → {{plural:1|is|are}}<br /> <tt><nowiki>{{plural:2|is|are}}</nowiki></tt> → {{plural:2|is|are}}
 
| Outputs the correct given pluralization form (parameters except first) depending on the count (first parameter). Plural transformations are used for languages like Russian based on "count mod 10".
 
|
 
|-
 
| <tt><nowiki>{{grammar:N|</nowiki>''noun''<nowiki>}}</nowiki></tt>
 
|
 
| Outputs the correct inflected form of the given word described by the inflection code after the colon (language-dependent).  Grammar transformations are used for inflected languages like Polish.  See also {{mediawiki|Manual:$wgGrammarForms}}.
 
| 1.7+
 
|}
 
  
===Miscellaneous===
+
(on e.g. the German and the Dutch sites reversed w.r.t. the result on English sites).
{| {{prettytable|class="plainlinks"}}
 
!{{Hl2}}| Usage
 
!{{Hl2}}| Output
 
!{{Hl2}}| Description
 
!{{Hl2}}| Version
 
|-
 
| <tt><nowiki>{{int:</nowiki>''message name''<nowiki>}}</nowiki>
 
| <tt><nowiki>{{int:</nowiki>edit<nowiki>}}</nowiki></tt> &rarr; '''{{int:edit}}''' <br /><small>''(depends on user language, try: [{{fullurl:{{FULLPAGENAME}}|uselang=fr}}#Miscellaneous fr] &bull;[{{fullurl:{{FULLPAGENAME}}|uselang=ja}}#Miscellaneous ja])''</small>
 
| Internationalizes (translates) the given '''int'''erface (MediaWiki namespace) message into the user language. ''Note that this can damage/confuse cache consistency, see [[bugzilla:14404|bug 14404]].''
 
|
 
|-
 
| <tt><nowiki>{{#language:</nowiki>''language code''<nowiki>}}</nowiki></tt><br /><tt><nowiki>{{#language:ar}}</nowiki></tt><br /><tt><nowiki>{{#language:th}}</nowiki></tt>
 
| {{#language:language code}}<br />{{#language:ar}}<br />{{#language:th}}
 
| The native name for the given language code, in accordance with [[w:ISO 639|ISO 639]].
 
| {{mediawiki|rev:14490|1.7+}}
 
|-
 
| <tt><nowiki>{{#special:</nowiki>''special page name''<nowiki>}}</nowiki><br /><nowiki>{{#special:userlogin}}</nowiki></tt>
 
| {{#special:special page name}}<br />{{#special:userlogin}}
 
| The localized name for the given canonical Special: page.
 
| {{mediawiki|rev:17321|1.9+}}
 
|-
 
| <tt><nowiki>{{#tag:</nowiki>''tagname''<br><nowiki>|</nowiki>''content''<br><nowiki>|</nowiki>''parameter1=value1''<br /><nowiki>|</nowiki>''parameter2=value2''<br /><nowiki>}}</nowiki></tt>
 
| ''(depends on parser tag)''
 
| Alias for XML-style parser or extension tags, but parsing wiki code. Inner content can be passed as first parameter, and attributes as subsequent ones:
 
  
<code><</code>''tagname'' ''attribute1''="''value1''" ''attribute2''="''value2''"<code>></code> ''content'' <code></</code>''tagname'' <code>></code> &rarr; <code><nowiki>{{#tag:</nowiki></code>''tagname''<code><nowiki>|</nowiki></code>''content''<code><nowiki>|</nowiki></code>''attribute1''=''value1''<code><nowiki>|</nowiki></code>''attribute2''=''value2''<code><nowiki>}}</nowiki></code>
+
"Plural" is used in various system messages, e.g. {{msg|nmembers}}, where it uses interface language instead of site language.
  
'''Warning''' : You must write <code><nowiki>{{#tag:</nowiki></code>''tagname''<code><nowiki>||</nowiki></code>''attribute1''=''value1''<code><nowiki>|</nowiki></code>''attribute2''=''value2''<code><nowiki>}}</nowiki></code> to pass an empty content.
+
== See also ==
| {{mediawiki|rev:29482|1.12+}}
+
* [[mw:Help:Extension:ParserFunctions|ParserFunctions]] '''#expr:''', '''#if:''', '''#ifeq:''', etc.
|-
+
* [[mw:Manual:Magic words]]
| <tt><nowiki>{{gender:</nowiki>''username''<br /><nowiki>|</nowiki>''return text if user is male''<br /><nowiki>|</nowiki>''return text if user is female''<br /><nowiki>|</nowiki>''return text if user hasn't defined their gender''<nowiki>}}</nowiki></tt>
+
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/Language.php Source for Language.php]
| ''(depends on the named user's gender)''
+
* [http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/includes/MagicWord.php Source for MagicWord.php]
| A switch for the gender set in [[Special:Preferences]]
+
* [[m:Extending_wiki_markup#Parser_functions|Adding parser functions]]
| {{mediawiki|rev:46247|1.15+}}
+
* [[mw:Extension:Variables]]'' : MediaWiki extension to add new magic words''
|}
 
  
{{languages}}
+
==Notes and references==
 +
<div style="font-size:0.9em;"><references/></div>
 +
{{H:f|enname=Magic words}}
  
[[Category:Help|{{PAGENAME}}]]
+
[[Category:Editor handbook]]
[[Category:Time|{{PAGENAME}}]]
 
[[Category:Magic words|{{PAGENAME}}]]
 

Latest revision as of 22:02, 10 October 2013

Comment See Help:Magic words on www.mediawiki.org for more magic words in the MediaWiki software. The page here is currently kept for things not yet merged to www.mediawiki.org and for documentation specific to the Wikimedia Foundation. If something is missing from both pages, check the full version of this page and restore the lacking information.


MediaWiki Handbook: Contents, Readers, Editors, Moderators, System admins +/-

This is an organized index of magic words used in MediaWiki.

A "magic word" is a symbol recognized by the MediaWiki software and which when seen in the non-commented text of the page, triggers the software to do something other than display that symbol, or transclude a page with that name, but instead to use the symbol directly.

A magic word can be:

  • a behavior switch, called using an upper case word, preceded and followed by pairs of underscores, e.g. __NOTOC__
  • XML-style tags, preceded by "<" (and for the end tag "/") and followed by ">", as in <nowiki>...</nowiki>
  • a parser function: similar to a template, a word preceded by the symbols "{{" and followed by "}}", and optionally parameter definitions between pipe characters, except that the part before the first pipe (or without pipes, the text between the braces) contains a colon (":"), e.g. {{ns:3}} and {{#ifexpr:{{{1}}}>3|large|small}}
  • a variable: similar to a template without parameters, a word preceded by the symbols "{{" and followed by "}}", except the word used is in all upper case, e.g. {{CURRENTDAY}}
  • a template modifier
  • an image modifier

If a page in the template namespace has the same name as a magic word, the magic word will be invoked instead. If you discover you absolutely have to define a template with the same name as a magic word, prefix the name of the template with "msg:" or the name of the template namespace ("Template:"). See below for further details if you need this feature.

Variables

For details see Help:Variable

Page names and related info

Word Example Explanation
This page "User:Anonymous user/sandbox/my page" page
"User talk:Anonymous user/sandbox/my page" page
{{PAGENAME}} Magic words Anonymous user/sandbox/my page Returns the name of the current page, including all levels (Title/Subtitle). This does not include the name of the namespace.
{{PAGENAMEE}} Magic_words Anonymous_user/sandbox/my_page More URL-friendly percent encoded special characters (to use an article name in an external link).
{{BASEPAGENAME}}
{{BASEPAGENAMEE}}
Magic words
Magic_words
Anonymous user/sandbox
Anonymous_user/sandbox
[MW 1.7+] The basename of a subpage ("Title/Other" on "Title/Other/Subtitle"), see Help:Link.
{{SUBPAGENAME}}
{{SUBPAGENAMEE}}
Magic words
Magic_words
my page
my_page
[MW 1.6+] Name of the current page, excluding parent pages ("Subtitle" on "Title/Other/Subtitle") in namespaces supporting subpages, see Help:Link.
{{NAMESPACE}}
{{NAMESPACEE}}
Help
Help
User
User
Returns the name of the namespace the current page resides in. Note that this returns an empty string for the main (article) space.
User talk
User_talk
{{FULLPAGENAME}}
{{FULLPAGENAMEE}}
Help:Magic words
Help:Magic_words
User:Anonymous user/sandbox/my page
User:Anonymous_user/sandbox/my_page
[MW 1.6+] Shorthands for NAMESPACE+PAGENAME.
User talk:Anonymous user/sandbox/my page
User_talk:Anonymous_user/sandbox/my_page
{{TALKSPACE}}
{{TALKSPACEE}}
Help talk
Help_talk
User talk
User_talk
[MW 1.7+] Name of next odd namespace (e.g. 4 ⇒ 5).
{{SUBJECTSPACE}}
{{SUBJECTSPACEE}}
Help
Help
User
User
[MW 1.7+] Name of last even namespace (e.g. 5 ⇒ 4).
{{ARTICLESPACE}}
{{ARTICLESPACEE}}
Help
Help
User
User
[MW 1.7+] An alias for SUBJECTSPACE(E).
{{TALKPAGENAME}}
{{TALKPAGENAMEE}}
Help talk:Magic words
Help_talk:Magic_words
User talk:Anonymous user/sandbox/my page
User_talk:Anonymous_user/sandbox/my_page
[MW 1.7+] FULLPAGENAME in its TALKSPACE.
{{SUBJECTPAGENAME}}
{{SUBJECTPAGENAMEE}}
Help:Magic words
Help:Magic_words
User:Anonymous user/sandbox/my page
User:Anonymous_user/sandbox/my_page
[MW 1.7+] FULLPAGENAME in its SUBJECTSPACE.
{{ARTICLEPAGENAME}}
{{ARTICLEPAGENAMEE}}
Help:Magic words
Help:Magic_words
User:Anonymous user/sandbox/my page
User:Anonymous_user/sandbox/my_page
[MW 1.7+] An alias for SUBJECTPAGENAME(E).
{{REVISIONID}} 71975 N/A [MW 1.5+] The unique identifying number of a page, see Help:Diff. Note that when editing a page, this value is null.
{{REVISIONDAY}} 10 N/A [MW 1.8+] The day on which the page was last modified.
{{REVISIONDAY2}} 10 N/A [MW 1.8+] The day on which the page was last modified, but with a leading zero (01 … 31).
{{REVISIONMONTH}} 10 N/A [MW 1.8+] The month in which the page was last modified.
{{REVISIONYEAR}} 2013 N/A [MW 1.8+] The year in which the page was last modified.
{{REVISIONTIMESTAMP}} 20131010220200 N/A [MW 1.8+] ISO 8601 time stamp, indicating when the page was last modified.
{{SITENAME}} SacredWiki Value of $wgSitename.
{{SERVER}} https://www.sacredwiki.org Value of $wgServer.
{{SCRIPTPATH}} [MW 1.5+] $wgScriptPath.
{{SERVERNAME}} www.sacredwiki.org [MW 1.5+] $wgServerName.


Template modifiers

Usage Explanation
{{:xyz}} A bare colon is not a template modifier, it's the prefix for the main namespace. Test e.g. article {{:UTC}} vs. template {{UTC}}.
Using this syntax you include the text of the main namespace article xyz in another article.
{{int:xyz}} Same as {{MediaWiki:xyz}}, except standard message translation is applied depending on subpages and content/user/uselang language. Another difference is: this doesn't appear under "Templates used on this page:". Rendered as ⧼xyz⧽ if MediaWiki:xyz doesn't exist. See also Help:System message.
{{msg:xyz}} Even if there is a magic word named "xyz", use template:xyz unless the template doesn't exist (equivalent to {{template:xyz}}). Normally, magic words have priority when there is a conflict.
{{msgnw:xyz}} The unexpanded wikitext is rendered (more or less, for details see msgnw).
{{raw:xyz}} [MW1.6+] Equivalent to {{msg:xyz}} above<ref>Wikimedia SVN revision 12925</ref>.
{{subst:xyz}} In the wikitext, the tag is substituted by the content (single-level evaluation only), see Help:Substitution.


Image modifiers

For details see w:en:Wikipedia:Extended image syntax.

These are image modifiers used in [[File:title.ext|modifier|...|modifier]] links. Some are mutually exclusive, and then the last specified wins. The last unrecognized modifier is used as caption for framed images or together with thumbnails. It's also used as description alt=text.

Size

Word Usage Explanation
framed
frame
enframed
[[File:Mediawiki.png|framed]] Places an image in a frame with a description. Uses original size and stubbornly ignores width parameter if given.
In general, far better to use thumb, as is only suitable for small images.
border [[File:Mediawiki.png|border]] Shows a 1 pixel border around the image.
thumbnail
thumb
[[File:Mediawiki.png|thumbnail]] Modifies image size, sets it dependent on user's favorite thumbnail size in one's preferences, or on the given width parameter (see hereafter).
thumb=xyz [[File:Mediawiki.png|thumb=Wiki.png]] Manual thumbnail: instead of displaying an automatically-sized thumbnail for Mediawiki.png, display the image Wiki.png.
width px
100x200px
[[File:Mediawiki.png|40px]]
[[File:Mediawiki.png|100x200px]]
Scales image to given width  in pixels.
Scales image to no more than 100 pixels wide and no more than 200 high, but image scaled to retain its true aspect ratio within the boundary specified.


Position

For details see Help:Images and other uploaded files.

The positions are mutually exclusive; the last specified wins. Template:Clear can stop floating. For inline images only modifier px (see hereinbefore) is supported.

Word Usage Explanation
right [[File:Mediawiki.png|right]] Sets top of image to the right margin, text will flow from the left.
left [[File:Mediawiki.png|left]] Sets top of image to the left margin, content text will flow from the right.
none [[File:Mediawiki.png|none]] Image will be alone at left, content text will not appear with image.
center
centre
[[File:Mediawiki.png|center]] Like none with image centered.


Miscellany

Word Example Explanation
{{DISPLAYTITLE:xyz}} no inline output [MW 1.7+] Modify the page's title [1], enabled in Wikimedia projects since June 2007 ([2]). Also see $wgAllowDisplayTitle.
{{DIRMARK}}
{{DIRECTIONMARK}}

[MW 1.7+] U+200E left-to-right or U+200D right-to-left mark.
{{CONTENTLANGUAGE}} en [MW 1.7+] Code of the site's default interface language ($wgLanguageCode).
{{DEFAULTSORT:xyz}} no inline output [MW 1.10+] Sets a default category sort key for the whole current page (also applying for category tags before this tag)<ref>"Technology report", English Wikipedia Signpost, January 2007</ref>.
#REDIRECT #REDIRECT [[target]]
at top of source page
Creates a redirect to another page (to the target page).


Despite its name MAGICNUMBER is no magic word, the ISBN magic works only on the MediaWiki:Booksources page used by Special:Booksources, but talking about [[{{ns:4}}:{{int:Booksources}}|{{ns:8}}:Booksources]] in a way working on any MediaWiki installation is esoteric enough to be noted here.

Language-dependent word conversions

Word Example Explanation
{{CURRENTMONTHNAMEGEN}} April Genitive form of month name used for Czech, Polish, Ukrainian[3]
{{LOCALMONTHNAMEGEN}} April Genitive form of month name used for Czech, Polish, Ukrainian (local time)
{{grammar:case | word }} {{grammar:7sg|Wikipedie}}
on cs: is Wikipedií.
Derived word forms in inflected languages like Czech [4]
{{plural:count |form1 |form2 }}
{{plural:count |1st | 2nd | 3rd }}
{{plural: 2 | is | are }}
outputs are
{{plural: 1 | this | these }}
outputs this
{{plural: 0 | his | their }}
outputs their
count 1 yields form1 (singular), plural transformations are used for languages like Russian [5] based on "count mod 10".


"Grammar" and "Plural" are language-dependent functions, defined in [6], [7], etc. (note that in PHP, the modulo operator is the percent sign).

"Grammar" can either be applied to predefined words only, or to arbitrary words, depending on whether the definition is just a 2D array, or involves string manipulations. See also cs:Šablona:Wikivar/GRAMMAR.

"Plural" is a site-language-dependent switch function, controlled by function convertPlural in Language.php (which distinguishes between 1 and "not 1"), for some languages overridden in Languagexx.php, e.g. for French (which distinguishes between <=1 and >1) and Russian, which uses a grammar case for amounts ending in 1 (1, 21, 31,...), another case for amounts ending in 2 to 4 (2, 3, 4, 22, 23, 24, ...) and still another case for the remaining quantities.

As opposed to ParserFunctions, "plural" accepts points and commas in numbers and interprets them in a site-language-specific way (depending on $separatorTransformTable in Messagesxx.php); on this site:

  • {{plural:1.000|a|b|c}} gives a
  • {{plural:1,000|a|b|c}} gives b

(on e.g. the German and the Dutch sites reversed w.r.t. the result on English sites).

"Plural" is used in various system messages, e.g. message with id 'nmembers' (talk), where it uses interface language instead of site language.

See also

Notes and references

<references/>


+/-

Links to other help pages

Help contents
Meta · Wikinews · Wikipedia · Wikiquote · Wiktionary · Commons: · mw: · b: · s: · mw:Manual · Google
Versions of this help page (for other languages see further)
Meta · Wikinews · Wikipediahttp://en.wikipedia.org/index.php/Help:Magic_words · Wikiquote · Wiktionary
What links here on Meta or from Meta · Wikipedia · MediaWiki
Reading
Go · Search · Stop words · Namespace · Page name · Section · Backlinks · Redirect · Category · Image page · Special pages · Printable version
Tracking changes
Recent changes (enhanced) | Related changes · Watching pages · Diff · Page history · Edit summary · User contributions · Minor edit · Patrolled edit
Logging in and preferences
Logging in · Preferences · User style
Editing
Starting a new page · Advanced editing · Editing FAQ · Edit toolbar · Export · Import · Shortcuts · Edit conflict · Page size
Referencing
Links · URLs · Piped links · Interwiki linking · Footnotes
Style and formatting
Wikitext examples · CSS · Reference card · HTML in wikitext · Formula · List · Table · Sorting · Colors · Images and file uploads
Fixing mistakes
Show preview · Testing · Reverting edits
Advanced functioning
Expansion · Template · Advanced templates · Parser function · Parameter default · Variable · System message · Substitution · Array · Calculation · Embed page
Others
Special characters · Renaming (moving) a page · Talk page · Signatures · Sandbox · Legal issues for editors