Help:Magic words
This is a copy of the master help page at m:Help:Magic words. Do not edit this page. Edits will be lost in the next update from the master page. Either edit the master help page for all projects at Meta, or edit the project-specific text at Template:Ph:Magic words. You are welcome to copy the exact wikitext from the master page at Meta and paste it into this page at any time.
This is an index of Magic words used in MediaWiki.
#redirect
editIndicates a redirect
__NOTOC__
editHides the table of contents.
__FORCETOC__
editAlways show the table of contents.
__TOC__
editPlace the table of contents here. See also compact TOC
__NOEDITSECTION__
editHide the edit links.
__START__
edit__START__ does nothing, and it is considered a magic word only because it has an ID in MagicWord.php (MAG_START
).
CURRENTMONTH
editA variable.
11
CURRENTMONTHNAME
editA variable.
November
CURRENTDAY
editA variable.
21
CURRENTDAYNAME
editA variable.
Thursday
CURRENTYEAR
editA variable.
2024
CURRENTTIME
editA variable.
10:57
NUMBEROFARTICLES
editA variable.
54,577
CURRENTMONTHNAMEGEN
editA variable.
November
PAGENAME
editA variable.
Magic words
PAGENAMEE
editA variable.
Magic_words
NAMESPACE
editA variable.
Help
MSG:
editA template modifier. I.e. {{msg:stub}} shows
{{Stub}}
The use of msg has an effect when a template name clashes with a magic word. For example, if [[Template:CURRENTMONTHNAME]] contained "Test", then {{CURRENTMONTHNAME}} would display "November" but {{msg:CURRENTMONTHNAME}} would display "Test".
SUBST:
editA template modifier. Replaces the reference to the template (e.g. {{subst:template}}) with the content of the template.
This article is a stub. You can help Wikimedia by expanding it.
MSGNW:
editA template modifier. Causes the template source to be pasted.
So {{msgnw:stub}} outputs:
{{asbox | image = Wiki letter w.svg{{!}}link= | imgalt = | category = Wikiquote stubs }}<noinclude> [[Category:Stub Templates| ]] </noinclude>
__END__
editAllows for trailing whitespace to be deliberately included in the page save.
thumbnail
editAn image modifier.
right
editAn image modifier.
left
editAn image modifier.
none
editAn image modifier.
$1px
editAn image modifier.
center
editAn image modifier. Can also be spelled centre.
framed
editAn image modifier. Can also be spelled enframed or frame.
INT:
editA special template. Used for UI messages.
mainpage
:
Main Page
SITENAME
editA variable.
Wikiquote
NS:
editA special template. Gets the name of a given namespace number.
4
:
Wikiquote
LOCALURL:
editA special template. Gets the local URL of the given page.
{{localurl:Help:Magic words|section=0}}
results into
/w/index.php?title=Help:Magic_words§ion=0
LOCALURLE:
editA special template. Gets the local URL of the given page.
{{localurle:Help:Magic words|section=0}}
results into
/w/index.php?title=Help:Magic_words§ion=0
SERVER
editA variable. {{SERVER}} produces //en.wikiquote.org
GRAMMAR:
editUseful for inflected languages to derive word forms. Usage: {{grammar:case|word}}, cases in which this could be used depend on the specific language.
E. g. in Czech language, {{grammar:1sg|Wikipedie}} outputs Wikipedie, while {{grammar:7sg|Wikipedie}} outputs Wikipedií.
__NOTITLECONVERT__
edit? Can also be spelled __NOTC__.
Same as below but Article Title only.
__NOCONTENTCONVERT__
edit? Can also be spelled __NOCC__.
Don't perform the content language(character & phase) conversion in article display.(eg, Chinese zh with zh_cn, zh_tw, zh_sg, zh_hk)
CURRENTWEEK
editA variable.
47
CURRENTDOW
editA variable.
4
Since v1.5
editCURRENTMONTHABBREV
editA variable, returns the abbreviation of the current month.
Nov
FULLURL:, FULLURLE:
editSpecial templates, give the full URL of the given page.
//en.wikiquote.org/wiki/Page
REVISIONID
editGives you the article or diff database
-
SCRIPTPATH
editReturns $wgScriptPath
/w
SERVERNAME
editReturns $wgServerName
en.wikiquote.org
NUMBEROFFILES
editReturns the number of uploaded files (rows in the image table).
0
Wikiquote-specific content
editLinks to other help pages
editHelp contents - all pages in the Help namespace: Meta b: c: n: w: q: wikisource wiktionary
|
External Links
edit- Special page on the Wikipedia