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}} 2018
{{CURRENTDAY}}
{{CURRENTDAY2}}
{{CURRENTDAYNAME}}
12
12 (zero-padded)
Wednesday
{{CURRENTMONTH}}
{{CURRENTMONTH2}}
{{CURRENTMONTHNAME}}
12
12 (zero-padded)
December
{{TODAY}} 2018-12-12
{{TOMORROW}} 2018-12-13
{{YESTERDAY}} 2018-12-11
{{DATENEXTWEEK}} 2018-12-19
{{DATELASTWEEK}} 2018-12-05
{{DATENEXTMONTH}} 2019-01-12
{{DATELASTMONTH}} 2018-11-12
{{DATENEXTYEAR}} 2019-12-13
{{DATELASTYEAR}} 2017-12-12

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