Changes

Jump to navigation Jump to search
227 bytes removed ,  04:54, 21 December 2019
m
no edit summary
Line 3: Line 3:  
{{PD Help Page}}
 
{{PD Help Page}}
   −
<!--T: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 explains only the standard magic words; for a technical reference, see <tvar|1>{{ll|Manual:Magic words}}</>.
     −
<!--T:2-->
+
'''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 explains only the standard magic words; for a technical reference, see {{ll|Manual:Magic words}}.
 +
 
 +
 
 
There are three general types of magic words:
 
There are three general types of magic words:
   −
<!--T:3-->
  −
* '''[[<tvar|bs>#Behavior switches</>|Behavior switches]]''': these are usually written as uppercase words surrounded by double underscores, ''e.g.'' '''<code>__FOO__</code>'''.
     −
<!--T:4-->
+
* '''[[#Behavior switches|Behavior switches]]''': these are usually written as uppercase words surrounded by double underscores, ''e.g.'' '''<code>__FOO__</code>'''.
* '''[[<tvar|var>#Variables</>|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[<tvar|help-templates>Special:MyLanguage/Help:Templates</>|templates]].
+
 
 +
 
 +
* '''[[#Variables|Variables]]''': these are uppercase words surrounded by double braces, ''e.g.'' '''<code><nowiki>{{FOO}}</nowiki></code>'''. As such, they look a lot like [[Special:MyLanguage/Help:Templates|templates]].
 +
 
   −
<!--T:5-->
+
* '''[[#Parser functions|Parser functions]]''': these take parameters and are either of the form'''<code><nowiki>{{foo:...}}</nowiki></code>''' '''<code><nowiki>{{#foo:...}}</nowiki></code>''', e.g. <code><nowiki>{{#invoke:}}</nowiki></code>. See also {{ll|Help:Extension:ParserFunctions}} and {{ll|Extension:Scribunto}}</>.
* '''[[<tvar|pfunc>#Parser functions</>|Parser functions]]''': these take parameters and are either of the form <tvar|1>'''<code><nowiki>{{foo:...}}</nowiki></code>'''</> or <tvar|2>'''<code><nowiki>{{#foo:...}}</nowiki></code>'''</>, e.g. <tvar|3><code><nowiki>{{#invoke:}}</nowiki></code></>. See also <tvar|help-ext-parser-functions>{{ll|Help:Extension:ParserFunctions}}</> and <tvar|4>{{ll|Extension:Scribunto}}</>.
      
<!--T:6-->
 
<!--T:6-->
Variables and parser functions can use [[<tvar|manual-subst>Special:MyLanguage/Manual:subst</>|subst:]], just like templates. 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.
+
Variables and parser functions can use [[Special:MyLanguage/Manual:subst|subst:]], just like templates. 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.
    
{{anchor|Behavior switches}}
 
{{anchor|Behavior switches}}
4,000

edits

Navigation menu