User:Jim Grisham/Sandbox/Reference/Demos/Rendered variables
References
Copied references to sort and format
| |
---|---|
This page is a quick reference for magic words. For more information, refer to the main MediaWiki documentation:
The software generally interprets magic words in the following way:
Magic words compared to templates:
|
Evaluates expression (see m:Help:Calculation).
See also
[[he:עזרה:משתנים]] |
Examples (live)
Section notes
|
---|
(note: add labels for each, or create a template to do that automatically) (note: allow ‘transcluding’ this section into other pages for (temporary) troubleshooting purposes?) (note: these ‘magic word variables’ can be given a different page name as a parameter, but they use a colon ( |
Page variables:
- User:Jim Grisham/Sandbox/Reference/Demos/Rendered variables
- Jim Grisham/Sandbox/Reference/Demos/Rendered variables
- Jim Grisham/Sandbox/Reference/Demos
- Jim Grisham
- Rendered variables
- User:Jim Grisham/Sandbox/Reference/Demos/Rendered variables
- User:Jim Grisham/Sandbox/Reference/Demos/Rendered variables
- User talk:Jim Grisham/Sandbox/Reference/Demos/Rendered variables
- 2
- User
- User
- User
- User talk
- Template:SHORTDESC (en-wp only)
Page variables (encoded versions):
- User:Jim_Grisham/Sandbox/Reference/Demos/Rendered_variables
- Jim_Grisham/Sandbox/Reference/Demos/Rendered_variables
- Jim_Grisham/Sandbox/Reference/Demos
- Jim_Grisham
- Rendered_variables
- User:Jim_Grisham/Sandbox/Reference/Demos/Rendered_variables
- User:Jim_Grisham/Sandbox/Reference/Demos/Rendered_variables
- User_talk:Jim_Grisham/Sandbox/Reference/Demos/Rendered_variables
- 2
- User
- User
- User
- User_talk
- Template:SHORTDESC (en-wp only)
Site variables:
- Wikipedia
- //en.wikipedia.org
- en.wikipedia.org
- /w
- 1.45.0-wmf.4 (146aca8)
Other variables:
Current date and time:
Page revision data:
Wiki statistics:
Parser functions - Metadata:
Transcluded help page
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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:
General informationIn general, there are three types of magic words.
The software generally interprets magic words in the following way:
Magic words compared to templates:
Most magic words can be used in any needed locations on a page; see MOS:ORDER for guidance on where Wikipedia prefers to place some magic words that are behavior switches (examples: DEFAULTSORT and DISPLAYTITLE). Behavior switches
Variables
Other variables by type
Parser functionsMetadata
Page IDs can be associated with articles via wikilinks (i.e. Formatting
Paths
Conditional
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.).
Other
Substituting and nestingMagic words can sometimes behave weirdly when substituted or nested. It's possible to subst some magic words (so that the page stops being updated if the value of the word changes). Here are some examples of how this works:
See also
Notes
|
Related templates
Subpages: all subpages of this page
Notes
Using templates for fun and profit
|
---|
‘Show variable example’ template
Variant 1
<dl>…</dl> )Variant 2
Variant 3(to do: an entire table row, using either Wiki or HTML markup)
Test dataNotes on template design
|