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.


Editing overview

Starting a new page

  1. Page name

Referencing

  1. Links
  2. Piped links
  3. Interwiki linking
  4. Variables
  5. URLs
  6. Anchors

Formatting

  1. Formulas
  2. Lists
  3. Tables
  4. HTML in wikitext
  5. Image & File uploads
  6. Image page

Organizing

  1. Sections
  2. Templates
  3. Categories
  4. Redirects
  5. Namespaces
  6. Renaming (moving) a page

Fixing mistakes and vandalism

  1. Reverting edits
  2. Testing

Saving effort

  1. Editing shortcuts
  2. Editing toolbar
  3. Magic words

Communicating

  1. Edit summary
  2. Talk page
  3. Edit conflict
  4. Minor edit

Special characters

  1. Turkish characters
  2. Romanian characters

Extensions

  1. WikiHiero syntax — warning: lots of images! (for Egyptian hieroglyphs)
  2. EasyTimeline syntax

Frequently Asked Questions


This is an index of Magic words used in MediaWiki.

#redirect

edit

Indicates a redirect

__NOTOC__

edit

Hides the table of contents.

__FORCETOC__

edit

Always show the table of contents.

__TOC__

edit

Place the table of contents here. See also compact TOC

__NOEDITSECTION__

edit

Hide 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

edit

A variable.

06

CURRENTMONTHNAME

edit

A variable.

June

CURRENTDAY

edit

A variable.

14

CURRENTDAYNAME

edit

A variable.

Friday

CURRENTYEAR

edit

A variable.

2024

CURRENTTIME

edit

A variable.

05:19

NUMBEROFARTICLES

edit

A variable.

51,757

CURRENTMONTHNAMEGEN

edit

A variable.

June

PAGENAME

edit

A variable.

Magic words

PAGENAMEE

edit

A variable.

Magic_words

NAMESPACE

edit

A variable.

Help

MSG:

edit

A 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 "June" but {{msg:CURRENTMONTHNAME}} would display "Test".

SUBST:

edit

A 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:

edit

A 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__

edit

Allows for trailing whitespace to be deliberately included in the page save.

thumbnail

edit

An image modifier.

Mediawiki
edit

An image modifier.

Mediawiki
Mediawiki

left

edit

An image modifier.

Mediawiki
Mediawiki

none

edit

An image modifier.

Mediawiki
Mediawiki

$1px

edit

An image modifier.

Mediawiki

center

edit

An image modifier. Can also be spelled centre.

Mediawiki
Mediawiki

framed

edit

An image modifier. Can also be spelled enframed or frame.


Mediawiki

INT:

edit

A special template. Used for UI messages.

mainpage:
Main Page

SITENAME

edit

A variable.

Wikiquote

A special template. Gets the name of a given namespace number.

4:
Wikiquote

LOCALURL:

edit

A 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&section=0

LOCALURLE:

edit

A 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&section=0

SERVER

edit

A variable. {{SERVER}} produces //en.wikiquote.org

GRAMMAR:

edit

Useful 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

edit

A variable.

24

CURRENTDOW

edit

A variable.

5


Since v1.5

edit

CURRENTMONTHABBREV

edit

A variable, returns the abbreviation of the current month.

Jun

FULLURL:, FULLURLE:

edit

Special templates, give the full URL of the given page.

//en.wikiquote.org/wiki/Page

REVISIONID

edit

Gives you the article or diff database

-

SCRIPTPATH

edit

Returns $wgScriptPath

/w

SERVERNAME

edit

Returns $wgServerName

en.wikiquote.org

NUMBEROFFILES

edit

Returns the number of uploaded files (rows in the image table).

0

Wikiquote-specific content

edit
edit
Help contents - all pages in the Help namespace: Meta b: c: n: w: q: wikisource wiktionary


Reading: Overview | Go | Search | URL | Namespace | Page name | Section | Link | Backlinks | Piped link | Interwiki link | Redirect | Variable | Category
Tracking changes: Recent | (enhanced) | Related | Watching pages | Page history | Diff | User contributions | Edit summary | Minor edit
Logging in and preferences: Logging in | Preferences | User style
Editing: Overview| New page | Images/files | Image description page | Special characters | Formula | Table | EasyTimeline | Template intro | Renaming (moving) a page | Automatic conversion of wikitext | Talk page | Testing | rlc
Projects: Meta (master page) | Wikibooks | Wikicommons | Wikinews | Wikipedia | Wikiquote | Wikisource | Wiktionary
For other languages see Meta.

edit
 
commons
Wikimedia Commons has media related to: