2001:56a:f6fe:ba00:8440:8ab4:62be:d7c8 (talk) ←Blanked the page |
m Reverted edits by 2001:56A:F6FE:BA00:8440:8AB4:62BE:D7C8 (talk): Unexplained blanking of page (HG) (3.1.22) Tag: Huggle |
||
Line 1: | Line 1: | ||
{{redirect|WP:MAGIC|an introduction|Help:Magic words for beginners|help on the automatic transformation of wikitext|Help:Magic|the WikiProject on stage magic and illusions|Wikipedia:WikiProject Magic}} |
|||
{{Wikipedia how-to|H:MW|WP:MAGIC}} |
|||
'''Magic words''' (including '''parser functions''', '''variables''' and '''behavior switches''') are features of [[Help:Wiki markup|wiki markup]] that give instructions to Wikipedia's underlying [[MediaWiki]] software. For example, magic words can suppress or position the table of contents, disable indexing by external search engines, and produce output dynamically based on the current page or on user-defined conditional logic. Some of these features are especially useful for [[WP:Templates|templates]]. |
|||
This page is a quick reference for magic words. For more information, refer to the main MediaWiki documentation: |
|||
* [[mw:Help:Magic words]]: All standard magic words, including the "standard" parser functions. |
|||
* [[mw:Help:Extension:ParserFunctions]]: Additional parser functions, including conditional expressions. |
|||
== General information == |
|||
In general, there are three types of magic words: |
|||
# '''Variables'''. These are all uppercase, ''e.g.'', {{tld|PAGENAME}}. A variable will be wrapped in double braces and will return a value in its place. |
|||
# '''Parser functions''' are all lowercase. A parser function will be followed by colon and pipe-separated parameters, ''e.g.'', <code><nowiki>{{#ifexpr:Y|Yes|No}}</nowiki></code>, wrapped in double braces. They will take a value and return a value. |
|||
# '''Behavior switches''' often appear in double underscores, all uppercase, ''e.g.'', <code>__NOTOC<nowiki />__</code>. They will change the behavior of a page, rather than return a value. |
|||
The software generally interprets magic words in the following way. |
|||
* Magic words are [[case sensitive]]. |
|||
* [[Whitespace character|White space]] is generously allowed for readability. It will be stripped from the start and end of their keywords and parameters (as is also done inside templates). |
|||
* They can be [[WP:Transclusion|transcluded]], even variables "about the current page". This is ensured by the parsing order. |
|||
* Instead of magically transforming into HTML instructions, {{tag|[[help:wikitext#Nowiki|nowiki]]|o}} tags remove this magic so a magic word can itself be displayed (documented). |
|||
{{Magic<nowiki />}} words compared to {{[[Help:Template|template]]<nowiki />}}: |
|||
* As with templates, magic words can be [[help:transclusion|transcluded]] and [[Help:substitution|substituted]]. |
|||
* The names of {{magic words<nowiki />}} are purposely chosen to be unlike the names of {{templates<nowiki />}}, and vice versa. Many parser function names will begin with the # sign, but template names [[wp:NCHASHTAG | will not start with a # sign]], and probably not end in a : colon character, or be all-uppercase. |
|||
* The first parameter's syntax differs. In {{#magic: p1<nowiki />| p2 | p3}}, the name is #magic and it will be followed by an unspaced : colon and a required input parameter, p1. The first {{para|p1}} of a template is optional but would be preceded by a | pipe instead of a : colon. |
|||
== Behavior switches == |
|||
{{anchor|Behaviour switches}} |
|||
{{further|mw:Help:Magic words#Behavior switches}} |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Switch |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__TOC__</nowiki></kbd> |
|||
| Places the page's [[Help:Table of contents|table of contents (TOC)]] at the word's position. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__FORCETOC__</nowiki></kbd> |
|||
| Forces the TOC to appear in its default position. Can be used anywhere on a page. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NOTOC__</nowiki></kbd> |
|||
| Suppresses the appearance of the page's TOC. Can be used anywhere on a page. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NOEDITSECTION__</nowiki></kbd> |
|||
| Hides the "edit" links normally beside ''all'' headings on the page. To hide the edit link beside a ''particular'' heading, specify the heading using e.g. an [[HTML element|HTML tag]] such as {{tag|h2|content=''heading''}} rather than with the usual wiki equals-signs syntax (e.g. {{nowrap|1=<kbd>== ''heading'' ==</kbd>}}{{thinsp}}). |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NEWSECTIONLINK__</nowiki></kbd> |
|||
| On non-talk pages, adds a "{{int:vector-action-addsection}}" link as a means to add a new section to the page. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NONEWSECTIONLINK__</nowiki></kbd> |
|||
| Removes the "{{int:vector-action-addsection}}" link (the add-new-section link) on talk pages. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NOGALLERY__</nowiki></kbd> |
|||
| Replaces thumbnails on a category page with normal links. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__HIDDENCAT__</nowiki></kbd> |
|||
| Makes a category [[WP:HIDDENCAT|hidden]] when included on that category's page. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__INDEX__</nowiki></kbd> |
|||
| Instructs [[Web search engine|search engine]]s to index the page. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__NOINDEX__</nowiki></kbd> |
|||
| Instructs search engines not to index the page. See [[Wikipedia:Controlling search engine indexing]]. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__STATICREDIRECT__</nowiki></kbd> |
|||
| Prevents the link on a [[Help:Redirect|redirection]] page from being updated automatically when the page to which it redirects is moved (and "Update any redirects that point to the original title" is selected). Also instructs [[Help:Interwiki linking|interwiki]] [[Wikipedia:Bots|bots]] to treat the page as if an article. |
|||
|- |
|||
! scope="row" | <kbd><nowiki>__DISAMBIG__</nowiki></kbd> |
|||
| Marks a page as a [[WP:DAB|disambiguation page]], adds it to [[Special:DisambiguationPages]] and places inward links in [[Special:DisambiguationPageLinks]]. (See [[mw:Extension:Disambiguator]].) |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{DISPLAYTITLE:''title''}}</kbd> |
|||
| Used to amend the [[WP:DISPLAYTITLE|displayed form]] of the page's title. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{DEFAULTSORT:''sortkey''}}</kbd> |
|||
| Sets the default [[WP:SORTKEY|key]] (the index) under which the page is categorised. |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Extension:Wikibase Client#noexternallanglinks|{<nowiki/>{NOEXTERNALLANGLINKS}}]]</kbd> |
|||
|| (equivalent to {<nowiki/>{NOEXTERNALLANGLINKS|*}}{{thinsp}}) Suppresses the automated inclusion of [[Wikidata:Help:Linking Wikipedia pages|Wikidata]] [[Help:Interlanguage links|interlanguage links]] on the lefthand side of the page. Links to particular rather than all languages may be suppressed by using {<nowiki/>{NOEXTERNALLANGLINKS|''list''}}, where ''list'' a [[Vertical bar|pipe]]-[[Delimiter|delimited]] list of [[language code]]s (e.g. {<nowiki/>{NOEXTERNALLANGLINKS|fr{{pipe}}es{{pipe}}ja}} to suppress the French ("fr"), Spanish ("es") and Japanese ("ja") interlanguage links). |
|||
|} |
|||
== Variables == |
|||
{{Shortcut|WP:VAR}} |
|||
{{further|mw:Help:Magic words#Variables}} |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Page name variable |
|||
! scope="col" | Its output in this wikitext |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{FULLPAGENAME}}</kbd> |
|||
| {{FULLPAGENAME}} |
|||
| Canonical [[Help:page name|page name]]. ''Title line''. Title unless letter-case is altered with {{tld|DISPLAYTITLE}}. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{PAGENAME}}</kbd> |
|||
| {{PAGENAME}} |
|||
| Title line excluding [[Wikipedia:Namespace|namespace]]. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{BASEPAGENAME}}</kbd> |
|||
| {{BASEPAGENAME}} |
|||
| Title of parent page, excluding namespace. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{ROOTPAGENAME}}</kbd> |
|||
| {{ROOTPAGENAME}} |
|||
| Title of topmost parent (before all subpages), excluding namespace. |
|||
|- |
|||
! scope="row" | <kbd>[[wp:pagename#sub|{<nowiki/>{SUBPAGENAME}}]]</kbd> |
|||
| {{SUBPAGENAME}} |
|||
| On a subpage, rightmost portion of ''current'' title; higher subpagenames show as [[breadcrumb (navigation)|backlinks]]. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{ARTICLEPAGENAME}}</kbd> |
|||
| {{ARTICLEPAGENAME}} |
|||
| rowspan="2" | Title of the subject page associated with the current page. These are useful on talk pages (but see note about Category talk pages). |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SUBJECTPAGENAME}}</kbd> |
|||
| {{SUBJECTPAGENAME}} |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{TALKPAGENAME}}</kbd> |
|||
| {{TALKPAGENAME}} |
|||
| Title of the talk page associated with the current page. Useful on subject pages. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{NAMESPACENUMBER}}</kbd> |
|||
| {{NAMESPACENUMBER:{{FULLPAGENAME}}}} |
|||
| Number of the current page's namespace. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{NAMESPACE}}</kbd> |
|||
| {{NAMESPACE}} |
|||
| Namespace of the title. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{ARTICLESPACE}}</kbd> |
|||
| {{ARTICLESPACE}} |
|||
| rowspan="2" | On a talk page, the namespace part of the title of the associated subject page. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SUBJECTSPACE}}</kbd> |
|||
| {{SUBJECTSPACE}} |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{TALKSPACE}}</kbd> |
|||
| {{TALKSPACE}} |
|||
| Namespace of the talk page associated with the current page. |
|||
|- |
|||
! scope="row" | {{longitem|style=line-height:1.5em|<kbd>{<nowiki/>{FULLPAGENAMEE}<nowiki/>}</kbd>,<br/><kbd>{<nowiki/>{PAGENAMEE}<nowiki/>}</kbd>,<br/>{{pad|0.4em}}(etc.)}} |
|||
| {{longitem|style=line-height:1.5em|{{FULLPAGENAMEE}},<br/>{{PAGENAMEE}},<br/>(etc.)}} |
|||
| Adding an E to the end of the above variables, renders the above encoded for use in MediaWiki [[URL]]s (i.e. with underscores replacing spaces). |
|||
|}<!-- |
|||
-->''Note:'' The magic words above can also take a parameter, in order to parse values on a page other than the current page. A colon ({{thinsp}}''':'''{{thinsp}}) is used to pass the parameter, rather than a pipe ({{thinsp}}'''|'''{{thinsp}}) that is used in templates, like <kbd><nowiki>{{MAGICWORD:value}}</nowiki></kbd>. For example, <kbd><nowiki>{{TALKPAGENAME:Wikipedia:MOS}}</nowiki></kbd> returns <kbd><nowiki>Wikipedia talk:MOS</nowiki></kbd> on any page. See [[meta:Help:Page name]] for more details of parser functions. |
|||
''Note:'' |
|||
In the "Category" and "Category talk" namespaces, to wikilink (some) page name variables may require [[help:link|prefixing a colon]] to avoid unwanted categorization. |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Site variable |
|||
! scope="col" | Example |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SITENAME}}</kbd> |
|||
| {{SITENAME}} |
|||
| |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SERVER}}</kbd> |
|||
| {{SERVER}} |
|||
| |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SERVERNAME}}</kbd> |
|||
| {{SERVERNAME}} |
|||
| |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{SCRIPTPATH}}</kbd> |
|||
| {{SCRIPTPATH}} |
|||
| |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{CURRENTVERSION}}</kbd> |
|||
| {{CURRENTVERSION}} |
|||
| Returns current MediaWiki version. |
|||
|} |
|||
===Other variables by type=== |
|||
{| class="wikitable" |
|||
! scope="col" | Date and time |
|||
! scope="col" | Revision data |
|||
! scope="col" | Statistics{{sup|b}} |
|||
|- style="vertical-align:top" |
|||
| |
|||
{| |
|||
| ''Universal time'' |
|||
{{startplainlist}} |
|||
* <kbd>{<nowiki/>{CURRENTYEAR}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTMONTH}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTMONTHNAME}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTMONTHABBREV}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTDAY}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTDAY2}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTDOW}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTDAYNAME}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTTIME}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTHOUR}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTWEEK}}</kbd> |
|||
* <kbd>{<nowiki/>{CURRENTTIMESTAMP}}</kbd> |
|||
{{endplainlist}} |
|||
| ''Local website time'' |
|||
{{startplainlist}} |
|||
* <kbd>{<nowiki/>{LOCALYEAR}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALMONTH}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALMONTHNAME}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALMONTHABBREV}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALDAY}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALDAY2}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALDOW}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALDAYNAME}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALTIME}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALHOUR}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALWEEK}}</kbd> |
|||
* <kbd>{<nowiki/>{LOCALTIMESTAMP}}</kbd> |
|||
{{endplainlist}} |
|||
|} |
|||
|{{startplainlist}} |
|||
* <kbd>{<nowiki/>{REVISIONID}}{{sup|a}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONDAY}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONDAY2}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONMONTH}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONYEAR}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONTIMESTAMP}}</kbd> |
|||
* <kbd>{<nowiki/>{REVISIONUSER}}{{sup|c}}</kbd> |
|||
|{{startplainlist}} |
|||
* <kbd>{<nowiki/>{NUMBEROFPAGES}}</kbd> |
|||
* <kbd>{<nowiki/>{NUMBEROFARTICLES}}</kbd> |
|||
* <kbd>{<nowiki/>{NUMBEROFFILES}}</kbd> |
|||
* <kbd>{<nowiki/>{NUMBEROFEDITS}}</kbd> |
|||
<!--disabled in MediaWiki (see talk page): * <kbd>{<nowiki/>{NUMBEROFVIEWS}}</kbd> |
|||
-->* <kbd>{<nowiki/>{NUMBEROFUSERS}}</kbd> |
|||
* <kbd>{<nowiki/>{NUMBEROFADMINS}}</kbd> |
|||
* <kbd>{<nowiki/>{NUMBEROFACTIVEUSERS}}</kbd> |
|||
{{endplainlist}} |
|||
|} |
|||
:{{sup|a}} <kbd>{<nowiki/>{REVISIONID}}</kbd> cannot be [[Wikipedia:Substitution|substituted]] and does not function in preview. |
|||
:{{sup|b}} English Wikipedia. |
|||
:{{sup|c}} This shows the last user to edit the page. There is no way to show the user viewing the page due to technical issues. |
|||
== Parser functions == |
|||
{{Shortcut|WP:PF}} |
|||
{{further|mw:Help:Magic words#Parser functions|mw:Help:Extension:ParserFunctions}} |
|||
===Metadata=== |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Function |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{PAGEID}}</kbd> |
|||
| Unique page identifier number. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{PAGESIZE:''fullpagename''}}</kbd> |
|||
| Size of named page in bytes. |
|||
|- |
|||
! scope="row" | {{anchor|PROTECTIONLEVEL}}<kbd>{<nowiki/>{PROTECTIONLEVEL:''action''{{pipe}}''fullpagename''}}</kbd> |
|||
| [[Wikipedia:Protection policy|Protection level]] assigned to ''action'' ("edit", "move", etc.) on named page. |
|||
|- |
|||
! scope="row" | {{anchor|PROTECTIONEXPIRY}}<kbd>{<nowiki/>{PROTECTIONEXPIRY:''action''{{pipe}}''fullpagename''}}</kbd> |
|||
| [[Wikipedia:Protection policy|Protection expiry]] assigned to ''action'' ("edit", "move", etc.) on named page. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{PENDINGCHANGELEVEL}}</kbd> |
|||
| Protection level for [[WP:PC|pending changes]] on the current page. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{PAGESINCATEGORY:''pagename''}}</kbd> |
|||
| Number of pages in the category named ''pagename''. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki/>{NUMBERINGROUP:''groupname''}}</kbd> |
|||
| Number of users in the [[Help:User rights|usergroup]] named ''groupname''. |
|||
|} |
|||
To output numbers without comma [[Delimiter|separator]]s (for example, as "123456789" rather than "123,456,789"), append the parameter <kbd>|R</kbd>. |
|||
===Formatting=== |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Function |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd> {{((}}lc:''string''{{))}} </kbd> |
|||
| Converts all characters in ''string'' to lower case. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}lcfirst:''string''{{))}} </kbd> |
|||
| Converts first character of ''string'' to lower case. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}uc:''string''{{))}} </kbd> |
|||
| Converts all characters in ''string'' to upper case. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}ucfirst:''string''{{))}} </kbd> |
|||
| Converts first character of ''string'' to upper case. |
|||
|- |
|||
! scope="row" | <kbd> |
|||
{{((}}formatnum:''unformatted_number''{{))}}<br>{{((}}formatnum:''formatted_num'' {{pipe}}R{{))}} </kbd> |
|||
| Adds comma separators to an ''unformatted_number'' (e.g. 123456789 becomes {{formatnum:123456789}}). To remove such formatting, use <kbd>{{((}}formatnum:''formatted_number''{{pipe}}R{{))}}</kbd> (i.e. <kbd>{{braces|formatnum:7,654,321{{pipe}}R}}</kbd>, for example, produces {{formatnum:7,654,321|R}}). |
|||
|- |
|||
! scope="row" | <kbd> {{((}}#dateformat:''date''{{pipe}}''format''{{))}}<br/>{{((}}#formatdate:''date''{{pipe}}''format''{{))}} </kbd> |
|||
| Formats a date according to user preferences; a default can be given as an optional case-sensitive second parameter for users without date preference; can convert a date from an existing format to any of <code>dmy</code>, <code>mdy</code>, <code>ymd</code>, or <code>[[ISO 8601]]</code> formats, with the user's preference overriding the specified format. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}padleft:''xyz''{{pipe}}''stringlength''{{))}} <br/> {{((}}padright:''xyz''{{pipe}}''stringlength''{{))}} <br><br> |
|||
{{((}}padleft:''xyz''{{pipe}}''length''{{pipe}}''padstr''{{))}} <br/>{{((}}padright:''xyz''{{pipe}}''length''{{pipe}}''padstr''{{))}} </kbd> |
|||
| Pad with zeroes '0' to the right or left, to fill the given length; an alternative padding string can be given as a third parameter; the repeated padding string (''padstr'') will be truncated if its length does not evenly divide the required number of characters. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}plural:''N''{{pipe}}''singular''{{pipe}}''plural''{{))}} </kbd> |
|||
| Outputs ''singular'' if ''N'' is equal to 1, otherwise outputs ''plural''. See the [[mw:Help:Magic words#Localization|documentation at mediawiki.org]] for more details. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}#time:''format''{{pipe}}''object''{{))}} </kbd><br/><kbd> </kbd> <kbd> {{((}}#timel:''format''{{pipe}}''object''{{))}} <br><br> |
|||
{{((}}#time:d F Y{{pipe}}''date''{{pipe}}''langcode''{{))}} </kbd><br/><kbd> </kbd> |
|||
| Used to format dates and times, for ISO format, dots or English month names. <kbd>#timel</kbd> is based on local time as defined for each wiki; for English Wikipedia, this is identical to <kbd>#time</kbd>. The optional 3rd parameter is the output language code (French, German, Swedish: fr, de, sv, etc.). Example Finnish: <nowiki>{{#time:d F Y|June 30, 2016|fi}}</nowiki> shows: {{#time:d F Y|June 30, 2016|fi}} (June). ISO to German: <nowiki>{{#time:d. M Y|1987-10-31|de}}</nowiki> shows: {{#time:d. M Y|1987-10-31|de}}. For format codes, see: [[mw:Help:Extension:ParserFunctions##time]]. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}gender:''user''{{pipe}}''m_out''{{pipe}}''f_out''{{pipe}}''u_out''{{))}} </kbd> |
|||
| Outputs ''m_out'', ''f_out'' or ''u_out'' according to whether the gender specified in ''user''{{thinsp}}'s preferences is, respectively, male, female or unspecified. Other parameter permutations are available, see [[mw:Help:Magic words#gender]] and [[translatewiki:Special:MyLanguage/Gender|translatewiki:Gender]]. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Magic_words#Miscellaneous|{{((}}#tag:''tag''{{pipe}}''content with magic''{{))}} ]]</kbd> |
|||
| Only way to [[eval]]uate magic words ''inside a tag'', in order to generate <code><''tag''>''magic''</''tag''>. Also handles tag attributes. |
|||
|} |
|||
===Paths=== |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Function |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd> {{((}}localurl:''fullpagename'' {{pipe}}''query''{{))}} </kbd> |
|||
| Relative [[Path (computing)|path]] to page name. The ''query'' parameter is optional. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}fullurl:''fullpagename'' {{pipe}}''query''{{))}} </kbd> |
|||
| Absolute path, without [[Application layer|protocol prefix]] (i.e. without |
|||
"{{thinsp}}<nowiki>http:</nowiki>{{thinsp}}" etc.), to page name. The ''query'' parameter is optional. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}canonicalurl:''fullpagename'' {{pipe}}''query''{{))}} </kbd> |
|||
| Absolute path, including protocol prefix, to page name. The ''query'' parameter is optional. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}filepath:''filename''{{))}} </kbd> |
|||
| Absolute path to the media file ''filename''. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}urlencode:''string''{{))}} </kbd> |
|||
| Encodes ''string'' for use in URL query strings; <kbd>{{braces|urlencode:test string}}</kbd>, for example, produces: {{urlencode:test string}}. To encode ''string'' for use in URL paths or MediaWiki page names, append, respectively, {{para||PATH}} or {{para||WIKI}} (to produce "{{urlencode:test string|PATH}}" or "{{urlencode:test string|WIKI}}"). |
|||
|- |
|||
! scope="row" | <kbd> {{((}}anchorencode:''string''{{))}} </kbd> |
|||
| Input encoded for use in MediaWiki URL [[Help:Anchor|section anchor]]s. |
|||
|- |
|||
! scope="row" | <kbd> {{((}}ns:''n''{{))}} </kbd> |
|||
| Returns the name of the [[Help:Namespace|namespace]] whose index is the number ''n''. For MediaWiki URLs, use <kbd>{{((}}nse:{{))}}</kbd>. |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Help:Extension:ParserFunctions##rel2abs|{{((}}#rel2abs:''path''{{))}}]] </kbd> |
|||
| Converts a relative file path to an absolute path. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:ParserFunctions##titleparts|{{((}}#titleparts:''fullpagename''{{pipe}}''number''{{pipe}}''first segment''{{))}}]]</kbd> |
|||
| Splits the fullpagename (title) into that number of segments. |
|||
|} |
|||
===Conditional=== |
|||
{{further|Help:Conditional expressions}} |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Function |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" |<kbd> [[mw:Help:Extension:Parser functions##expr|{{((}}#expr:''expression''{{))}}]] </kbd> |
|||
| Evaluates ''expression'' (see [[m:Help:Calculation]]). |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:Parser functions##if|{{((}}#if:''string'' {{pipe}}''result1'' {{pipe}}''result2''{{))}}]] </kbd> |
|||
| Outputs ''result2'' if ''string'' is [[Empty string|empty]], otherwise outputs ''result1''. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:Parser functions##ifeq|{{((}}#ifeq:''string1''{{pipe}}''string2'' {{pipe}}''result1'' {{pipe}}''result2''{{))}}]] </kbd> |
|||
| Outputs ''result1'' if ''string1'' and ''string2'' are equal (alphabetically or numerically), otherwise outputs ''result2''. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:Parser functions##iferror|{{((}}#iferror:''test_string'' {{pipe}}''result1'' {{pipe}}''result2''{{))}}]] </kbd> |
|||
| Outputs ''result1'' if ''test_string'' generates a parsing error, otherwise outputs ''result2''. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:Parser functions##ifexpr|{{((}}#ifexpr:''expression'' {{pipe}}''result1'' {{pipe}}''result2''{{))}}]] </kbd> |
|||
| Outputs ''result1'' if ''expression''{{thinsp}} is true, otherwise outputs ''result2''. |
|||
|- |
|||
! scope="row" | <kbd> [[mw:Help:Extension:Parser functions##ifexist|{{((}}#ifexist:''pagetitle'' {{pipe}}''result1'' {{pipe}}''result2''{{))}}]] </kbd> |
|||
| Outputs ''result1'' if the page [<nowiki/>[''pagetitle'']] exists, otherwise outputs ''result2''. Note that underscores are needed for spaces in namespaces. |
|||
|- |
|||
! scope="row" style="white-space: nowrap;" | <kbd> [[mw:Help:Extension:Parser functions##switch|{{((}}#switch:''string'' {{pipe}}''c1''=''r1'' {{pipe}}''c2''=''r2'' ... {{pipe}}''default''{{))}}]] </kbd> |
|||
| Outputs ''r1'' if ''string'' is ''c1'', ''r2'' if ''string'' is ''c2'', etc., otherwise outputs ''default'' (if provided). |
|||
|} |
|||
If, in these conditional functions, [[Empty string|empty]] unnamed parameters are to be parsed as empty rather than as text (i.e. as empty rather than as the text "{{{1}}}", "{{{2}}}", etc.), they will require trailing pipes (i.e. <kbd>{{(((}}1{{pipe}}{{)))}}</kbd>, <kbd>{{(((}}2{{pipe}}{{)))}}</kbd>, etc., rather than <kbd>{{(((}}1{{)))}}</kbd>, <kbd>{{(((}}2{{)))}}</kbd>, etc.). |
|||
* For the use of these functions in tables, see [[Wikipedia:Conditional tables]]. |
|||
===Other=== |
|||
{| class="wikitable plainrowheaders" |
|||
! scope="col" | Function |
|||
! scope="col" | Description |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Extension:Babel#Usage|{<nowiki/>{#babel:''code1''|''code2''|...}}]]</kbd> |
|||
| Render [[wp:userbox|userbox]]es telling your language skills. Improves upon {{tl|Babel}} (an alternative). |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Extension:GeoData#Parser function|{<nowiki/>{#coordinates:''arg1''|''arg2''|...}}]]</kbd> |
|||
| Save the [[Geographic coordinate system|GeoData coordinates]] of the subject to the page's database. Used in {{tl|coord}}. |
|||
|- |
|||
! scope="row" style=white-space:nowrap| <kbd> [[mw:Extension:Scribunto#Usage|{<nowiki />{#invoke:''module''|''function''|''arg1''|...}}]]</kbd> |
|||
|| Use [[mw:extension:scribunto|Scribunto]] to transclude a [[wp:lua|lua]] template, e.g. function ''replace'' in [[Module:String#replace|module ''String'']]. |
|||
|- |
|||
! scope="row" | <kbd>{<nowiki />{[[mw:Help:Magic_words#Miscellaneous|#language]]:[[ISO_639|''code1'']]|''code2''}}</kbd> |
|||
| Print the name represented by the language code, e.g. '''en''' → '''English'''. Print in language 2 if given. |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Extension:Labeled Section Transclusion|<nowiki>{{#lst:}} {{#lsth:}} {{#lstx:}}</nowiki>]]</kbd> |
|||
| Three ways to [[Help:Labeled section transclusion|transclude a section of a page]]. |
|||
|- |
|||
! scope="row" | <kbd>[[m:Wikidata/Notes/Inclusion syntax v0.4|{<nowiki />{#property:''arg1''|''arg2''|...}} </kbd>]] |
|||
| Include a [[d:Help:FAQ#Terminology|property]] ([[wp:Wikidata|Wikidata]]) from a named entity, instead of the default on the page. |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Reading/Web/Projects/Read more|{<nowiki />{#related:...}}]]</kbd> |
|||
| Links to similar topics, to engage readers. (Beta feature.) |
|||
|- |
|||
! scope="row" | <kbd>[[Help:Labeled section transclusion|{{#section<nowiki />:}}{{zwsp}}{{#section-h<nowiki />:}}{{zwsp}}{{#section-x<nowiki />:}}]]</kbd> |
|||
| Aliases for <kbd><nowiki>{{#lst:}} {{#lsth}} {{#lstx}}</nowiki></kbd> (above). |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Help:Extension:MassMessage#Parser_function_delivery_lists|{<nowiki />{#target:''fullpagename''}}]]</kbd> |
|||
| Send a message to a list talk pages on the fullpagename, using the [[m:MassMessage|MassMessage function]]. |
|||
|- |
|||
! scope="row" | <kbd>[[mw:Help:Magic_words#Localization|{<nowiki />{int:''pagename''}}]] </kbd> |
|||
| [[Wikipedia:Transclusion|Transclude]] an ''interface'' message , i.e. a [[Special:PrefixIndex/MediaWiki:|pagename in MediaWiki namespace]] |
|||
|} |
|||
== See also == |
|||
*[[Help:Magic links]] - for ISBN, PMID and RFC |
|||
* [[mw:Localisation]] |
|||
* [[mw:Manual:Extending wiki markup]] |
|||
* [https://phabricator.wikimedia.org/diffusion/MW/history/master/includes/parser/CoreParserFunctions.php CoreParserFunctions.php] |
|||
* [[User:Cacycle/wikEd|wikEd]], a MediaWiki editor with syntax highlighting for templates and parser functions |
|||
* {{myprefs|9|Editing|check=Syntax highlighter}} |
|||
* [[Special:Version]], at the bottom of the page, all the <kbd>{<nowiki/>{magic words}}</kbd> on this page are listed there as Parser function hooks |
|||
{{Wikipedia technical help|collapsed}} |
|||
[[Category:Wikipedia features]] |
|||
[[he:עזרה:משתנים]] |
Revision as of 08:30, 23 April 2017
Magic words (including parser functions, variables and behavior switches) are features of wiki markup that give instructions to Wikipedia's underlying MediaWiki software. For example, magic words can suppress or position the table of contents, disable indexing by external search engines, and produce output dynamically based on the current page or on user-defined conditional logic. Some of these features are especially useful for templates.
This page is a quick reference for magic words. For more information, refer to the main MediaWiki documentation:
- mw:Help:Magic words: All standard magic words, including the "standard" parser functions.
- mw:Help:Extension:ParserFunctions: Additional parser functions, including conditional expressions.
General information
In general, there are three types of magic words:
- Variables. These are all uppercase, e.g.,
{{PAGENAME}}
. A variable will be wrapped in double braces and will return a value in its place. - Parser functions are all lowercase. A parser function will be followed by colon and pipe-separated parameters, e.g.,
{{#ifexpr:Y|Yes|No}}
, wrapped in double braces. They will take a value and return a value. - Behavior switches often appear in double underscores, all uppercase, e.g.,
__NOTOC__
. They will change the behavior of a page, rather than return a value.
The software generally interprets magic words in the following way.
- Magic words are case sensitive.
- White space is generously allowed for readability. It will be stripped from the start and end of their keywords and parameters (as is also done inside templates).
- They can be transcluded, even variables "about the current page". This is ensured by the parsing order.
- Instead of magically transforming into HTML instructions,
<nowiki>
tags remove this magic so a magic word can itself be displayed (documented).
{{Magic}} words compared to {{template}}:
- As with templates, magic words can be transcluded and substituted.
- The names of {{magic words}} are purposely chosen to be unlike the names of {{templates}}, and vice versa. Many parser function names will begin with the # sign, but template names will not start with a # sign, and probably not end in a : colon character, or be all-uppercase.
- The first parameter's syntax differs. In {{#magic: p1| p2 | p3}}, the name is #magic and it will be followed by an unspaced : colon and a required input parameter, p1. The first
|p1=
of a template is optional but would be preceded by a | pipe instead of a : colon.
Behavior switches
Switch | Description |
---|---|
__TOC__ | Places the page's table of contents (TOC) at the word's position. |
__FORCETOC__ | Forces the TOC to appear in its default position. Can be used anywhere on a page. |
__NOTOC__ | Suppresses the appearance of the page's TOC. Can be used anywhere on a page. |
__NOEDITSECTION__ | Hides the "edit" links normally beside all headings on the page. To hide the edit link beside a particular heading, specify the heading using e.g. an HTML tag such as <h2>heading</h2> rather than with the usual wiki equals-signs syntax (e.g. == heading == ).
|
__NEWSECTIONLINK__ | On non-talk pages, adds a "New section" link as a means to add a new section to the page. |
__NONEWSECTIONLINK__ | Removes the "New section" link (the add-new-section link) on talk pages. |
__NOGALLERY__ | Replaces thumbnails on a category page with normal links. |
__HIDDENCAT__ | Makes a category hidden when included on that category's page. |
__INDEX__ | Instructs search engines to index the page. |
__NOINDEX__ | Instructs search engines not to index the page. See Wikipedia:Controlling search engine indexing. |
__STATICREDIRECT__ | Prevents the link on a redirection page from being updated automatically when the page to which it redirects is moved (and "Update any redirects that point to the original title" is selected). Also instructs interwiki bots to treat the page as if an article. |
__DISAMBIG__ | Marks a page as a disambiguation page, adds it to Special:DisambiguationPages and places inward links in Special:DisambiguationPageLinks. (See mw:Extension:Disambiguator.) |
{{DISPLAYTITLE:title}} | Used to amend the displayed form of the page's title. |
{{DEFAULTSORT:sortkey}} | Sets the default key (the index) under which the page is categorised. |
{{NOEXTERNALLANGLINKS}} | (equivalent to {{NOEXTERNALLANGLINKS|*}} ) Suppresses the automated inclusion of Wikidata interlanguage links on the lefthand side of the page. Links to particular rather than all languages may be suppressed by using {{NOEXTERNALLANGLINKS|list}}, where list a pipe-delimited list of language codes (e.g. {{NOEXTERNALLANGLINKS|fr|es|ja}} to suppress the French ("fr"), Spanish ("es") and Japanese ("ja") interlanguage links). |
Variables
Page name variable | Its output in this wikitext | Description |
---|---|---|
{{FULLPAGENAME}} | Help:Magic words | Canonical page name. Title line. Title unless letter-case is altered with {{DISPLAYTITLE}} .
|
{{PAGENAME}} | Magic words | Title line excluding namespace. |
{{BASEPAGENAME}} | Magic words | Title of parent page, excluding namespace. |
{{ROOTPAGENAME}} | Magic words | Title of topmost parent (before all subpages), excluding namespace. |
{{SUBPAGENAME}} | Magic words | On a subpage, rightmost portion of current title; higher subpagenames show as backlinks. |
{{ARTICLEPAGENAME}} | Help:Magic words | Title of the subject page associated with the current page. These are useful on talk pages (but see note about Category talk pages). |
{{SUBJECTPAGENAME}} | Help:Magic words | |
{{TALKPAGENAME}} | Help talk:Magic words | Title of the talk page associated with the current page. Useful on subject pages. |
{{NAMESPACENUMBER}} | 12 | Number of the current page's namespace. |
{{NAMESPACE}} | Help | Namespace of the title. |
{{ARTICLESPACE}} | Help | On a talk page, the namespace part of the title of the associated subject page. |
{{SUBJECTSPACE}} | Help | |
{{TALKSPACE}} | Help talk | Namespace of the talk page associated with the current page. |
{{FULLPAGENAMEE}},
{{PAGENAMEE}}, (etc.) |
Help:Magic_words,
Magic_words, (etc.) |
Adding an E to the end of the above variables, renders the above encoded for use in MediaWiki URLs (i.e. with underscores replacing spaces). |
Note: The magic words above can also take a parameter, in order to parse values on a page other than the current page. A colon ( : ) is used to pass the parameter, rather than a pipe ( | ) that is used in templates, like {{MAGICWORD:value}}. For example, {{TALKPAGENAME:Wikipedia:MOS}} returns Wikipedia talk:MOS on any page. See meta:Help:Page name for more details of parser functions.
Note: In the "Category" and "Category talk" namespaces, to wikilink (some) page name variables may require prefixing a colon to avoid unwanted categorization.
Site variable | Example | Description |
---|---|---|
{{SITENAME}} | Wikipedia | |
{{SERVER}} | //en.wikipedia.org | |
{{SERVERNAME}} | en.wikipedia.org | |
{{SCRIPTPATH}} | /w | |
{{CURRENTVERSION}} | 1.43.0-wmf.7 (b6ef248) | Returns current MediaWiki version. |
Other variables by type
Date and time | Revision data | Statisticsb | ||
---|---|---|---|---|
|
|
|
- a {{REVISIONID}} cannot be substituted and does not function in preview.
- b English Wikipedia.
- c This shows the last user to edit the page. There is no way to show the user viewing the page due to technical issues.
Parser functions
Metadata
Function | Description |
---|---|
{{PAGEID}} | Unique page identifier number. |
{{PAGESIZE:fullpagename}} | Size of named page in bytes. |
{{PROTECTIONLEVEL:action|fullpagename}} | Protection level assigned to action ("edit", "move", etc.) on named page. |
{{PROTECTIONEXPIRY:action|fullpagename}} | Protection expiry assigned to action ("edit", "move", etc.) on named page. |
{{PENDINGCHANGELEVEL}} | Protection level for pending changes on the current page. |
{{PAGESINCATEGORY:pagename}} | Number of pages in the category named pagename. |
{{NUMBERINGROUP:groupname}} | Number of users in the usergroup named groupname. |
To output numbers without comma separators (for example, as "123456789" rather than "123,456,789"), append the parameter |R.
Formatting
Function | Description |
---|---|
{{lc:string}} | Converts all characters in string to lower case. |
{{lcfirst:string}} | Converts first character of string to lower case. |
{{uc:string}} | Converts all characters in string to upper case. |
{{ucfirst:string}} | Converts first character of string to upper case. |
{{formatnum:unformatted_number}} |
Adds comma separators to an unformatted_number (e.g. 123456789 becomes 123,456,789). To remove such formatting, use {{formatnum:formatted_number|R}} (i.e. {{formatnum:7,654,321|R}}, for example, produces 7654321). |
{{#dateformat:date|format}} {{#formatdate:date|format}} |
Formats a date according to user preferences; a default can be given as an optional case-sensitive second parameter for users without date preference; can convert a date from an existing format to any of dmy , mdy , ymd , or ISO 8601 formats, with the user's preference overriding the specified format.
|
{{padleft:xyz|stringlength}} {{padright:xyz|stringlength}} {{padleft:xyz|length|padstr}} |
Pad with zeroes '0' to the right or left, to fill the given length; an alternative padding string can be given as a third parameter; the repeated padding string (padstr) will be truncated if its length does not evenly divide the required number of characters. |
{{plural:N|singular|plural}} | Outputs singular if N is equal to 1, otherwise outputs plural. See the documentation at mediawiki.org for more details. |
{{#time:format|object}} {{#timel:format|object}} {{#time:d F Y|date|langcode}} |
Used to format dates and times, for ISO format, dots or English month names. #timel is based on local time as defined for each wiki; for English Wikipedia, this is identical to #time. The optional 3rd parameter is the output language code (French, German, Swedish: fr, de, sv, etc.). Example Finnish: {{#time:d F Y|June 30, 2016|fi}} shows: 30 kesäkuu 2016 (June). ISO to German: {{#time:d. M Y|1987-10-31|de}} shows: 31. Okt. 1987. For format codes, see: mw:Help:Extension:ParserFunctions##time. |
{{gender:user|m_out|f_out|u_out}} | Outputs m_out, f_out or u_out according to whether the gender specified in user 's preferences is, respectively, male, female or unspecified. Other parameter permutations are available, see mw:Help:Magic words#gender and translatewiki:Gender. |
{{#tag:tag|content with magic}} | Only way to evaluate magic words inside a tag, in order to generate <tag>magic</tag>. Also handles tag attributes.
|
Paths
Function | Description |
---|---|
{{localurl:fullpagename |query}} | Relative path to page name. The query parameter is optional. |
{{fullurl:fullpagename |query}} | Absolute path, without protocol prefix (i.e. without
" http: " etc.), to page name. The query parameter is optional. |
{{canonicalurl:fullpagename |query}} | Absolute path, including protocol prefix, to page name. The query parameter is optional. |
{{filepath:filename}} | Absolute path to the media file filename. |
{{urlencode:string}} | Encodes string for use in URL query strings; {{urlencode:test string}}, for example, produces: test+string. To encode string for use in URL paths or MediaWiki page names, append, respectively, |PATH or |WIKI (to produce "test%20string" or "test_string").
|
{{anchorencode:string}} | Input encoded for use in MediaWiki URL section anchors. |
{{ns:n}} | Returns the name of the namespace whose index is the number n. For MediaWiki URLs, use {{nse:}}. |
{{#rel2abs:path}} | Converts a relative file path to an absolute path. |
{{#titleparts:fullpagename|number|first segment}} | Splits the fullpagename (title) into that number of segments. |
Conditional
Function | Description |
---|---|
{{#expr:expression}} | Evaluates expression (see m:Help:Calculation). |
{{#if:string |result1 |result2}} | Outputs result2 if string is empty, otherwise outputs result1. |
{{#ifeq:string1|string2 |result1 |result2}} | Outputs result1 if string1 and string2 are equal (alphabetically or numerically), otherwise outputs result2. |
{{#iferror:test_string |result1 |result2}} | Outputs result1 if test_string generates a parsing error, otherwise outputs result2. |
{{#ifexpr:expression |result1 |result2}} | Outputs result1 if expression is true, otherwise outputs result2. |
{{#ifexist:pagetitle |result1 |result2}} | Outputs result1 if the page [[pagetitle]] exists, otherwise outputs result2. Note that underscores are needed for spaces in namespaces. |
{{#switch:string |c1=r1 |c2=r2 ... |default}} | Outputs r1 if string is c1, r2 if string is c2, etc., otherwise outputs default (if provided). |
If, in these conditional functions, empty unnamed parameters are to be parsed as empty rather than as text (i.e. as empty rather than as the text "{{{1}}}", "{{{2}}}", etc.), they will require trailing pipes (i.e. {{{1|}}}, {{{2|}}}, etc., rather than {{{1}}}, {{{2}}}, etc.).
- For the use of these functions in tables, see Wikipedia:Conditional tables.
Other
Function | Description |
---|---|
{{#babel:code1|code2|...}} | Render userboxes telling your language skills. Improves upon {{Babel}} (an alternative). |
{{#coordinates:arg1|arg2|...}} | Save the GeoData coordinates of the subject to the page's database. Used in {{coord}}. |
{{#invoke:module|function|arg1|...}} | Use Scribunto to transclude a lua template, e.g. function replace in module String. |
{{#language:code1|code2}} | Print the name represented by the language code, e.g. en → English. Print in language 2 if given. |
{{#lst:}} {{#lsth:}} {{#lstx:}} | Three ways to transclude a section of a page. |
{{#property:arg1|arg2|...}} | Include a property (Wikidata) from a named entity, instead of the default on the page. |
{{#related:...}} | Links to similar topics, to engage readers. (Beta feature.) |
{{#section:}}{{#section-h:}}{{#section-x:}} | Aliases for {{#lst:}} {{#lsth}} {{#lstx}} (above). |
{{#target:fullpagename}} | Send a message to a list talk pages on the fullpagename, using the MassMessage function. |
{{int:pagename}} | Transclude an interface message , i.e. a pagename in MediaWiki namespace |
See also
- Help:Magic links - for ISBN, PMID and RFC
- mw:Localisation
- mw:Manual:Extending wiki markup
- CoreParserFunctions.php
- wikEd, a MediaWiki editor with syntax highlighting for templates and parser functions
- Preferences → Gadgets → Editing → Syntax highlighter
- Special:Version, at the bottom of the page, all the {{magic words}} on this page are listed there as Parser function hooks