Help:Variables

Variables return information about the current page, wiki, or date. Their syntax is similar to templates.

Most variables (except for pseudo variables below) are types of "magic words". See magic words at MediaWiki for a complete list.



Date and time
The following variables return the current date and time in UTC.

Due to software and browser caching, these variables frequently show when the page was cached rather than the current time.

Technical metadata
Revision variables return data about the latest edit to the current page, even if viewing an older version of the page.

Statistics
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,  &rarr;  and   &rarr; ). Use "|R" for magic words that require a parameter like PAGESINCATEGORY (for example  and  ).

Namespaces
The following are equivalents encoded for use in URLs (spaces replaced with underscores and some characters percent-encoded):
 *  
 *  
 *  

These can take a page name and will return the namespace of the page name parameter, instead of the current page's:
 *   &rarr; 
 *   &rarr; 
 *   &rarr; 

Page names
The following are equivalents encoded for use in MediaWiki URLs (i.e. spaces replaced with underscores and some characters percent-encoded):
 *  
 *  </tt>
 * <tt> </tt>
 * <tt> </tt>
 * <tt> </tt>
 * <tt> </tt>
 * <tt> </tt>

These can all allow specification of the page to be operated on, instead of just the current page:
 * <tt> </tt> &rarr; 

Pseudo variables
Some templates have been created that mimic the above variables. While the variables in the above section use a colon to specify a page for output if desired, these will use a pipe (|) for inputting a page. For example, can be used to get.

For the latter templates, it's easier to see the difference between them by viewing a side-by-side comparison of their outputs.