Help:Magic Words

From MixesDB
Jump to: navigation, search

For the default list of magic words see mediawiki.org/wiki/Help:Magic_words

Page names

Input Output
{{PAGENAME}} Magic Words
{{FULLPAGENAME}} Help:Magic Words
{{NAMESPACE}} Help
{{BASEPAGENAME}} On User:MDB/Quick Links this would be "MDB"
{{SUBPAGENAME}} On User:MDB/Quick Links this would be "Quick Links"
URL encoded page names

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

  • {{FULLPAGENAMEE}}
  • {{PAGENAMEE}}
  • {{BASEPAGENAMEE}}
  • {{SUBPAGENAMEE}}

Dates

Input Output
{{CURRENTYEAR}} 2017
{{CURRENTDAY}}
{{CURRENTDAY2}}
{{CURRENTDAYNAME}}
19
19 (zero-padded)
Thursday
{{CURRENTMONTH}}
{{CURRENTMONTH2}}
{{CURRENTMONTHNAME}}
01
01 (zero-padded)
January
{{TODAY}} 2017-01-19
{{TOMORROW}} 2017-01-20
{{YESTERDAY}} 2017-01-18
{{DATENEXTWEEK}} 2017-01-26
{{DATELASTWEEK}} 2017-01-12
{{DATENEXTMONTH}} 2017-02-19
{{DATELASTMONTH}} 2016-12-19
{{DATENEXTYEAR}} 2018-01-20
{{DATELASTYEAR}} 2016-01-19

To display a date according to your own "date format" preference (e.g. "19 January 2017"), use {{#dateformat:}}, e.g. {{#dateformat: {{TODAY}} }}.