Welcome to the Virtual Education Wiki ~ Open Education Wiki

Help:Magic words: Difference between revisions

From Virtual Education Wiki
Jump to navigation Jump to search
(slap)
 
(new entry)
 
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 explains only the standard magic words; for a technical reference, see Manual:Magic words.


There are three general types of magic words:


* Behavior switches: these are usually written as uppercase words surrounded by double underscores, e.g. <nowiki>__FOO__</nowiki>.
* Variables: these are uppercase words surrounded by double braces, e.g. <nowiki>{{FOO}}</nowiki>. As such, they look a lot like templates.
* Parser functions: these take parameters and are either of the form <nowiki>{{foo:...}}</nowiki> or <nowiki>{{#foo:...}}</nowiki>, e.g. <nowiki>{{#invoke:...}}</nowiki>.


See also Help:Extension:ParserFunctions at https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions
Variables and parser functions can use 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.
For exhaustive detail see https://www.mediawiki.org/wiki/Help:Magic_words


----
----

Latest revision as of 14:02, 10 May 2023

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 Manual:Magic words.

There are three general types of magic words:

  • Behavior switches: these are usually written as uppercase words surrounded by double underscores, e.g. __FOO__.
  • Variables: these are uppercase words surrounded by double braces, e.g. {{FOO}}. As such, they look a lot like templates.
  • Parser functions: these take parameters and are either of the form {{foo:...}} or {{#foo:...}}, e.g. {{#invoke:...}}.

See also Help:Extension:ParserFunctions at https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions

Variables and parser functions can use 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.

For exhaustive detail see https://www.mediawiki.org/wiki/Help:Magic_words


> Help:Index
>> Main Page