Magic words
Jump to navigation
Jump to search
Magic words are strings of text that MediaWiki associates with a return value or function, such as time, site details, or page name.
Behavior switches
These magic words change the standard behavior of MediaWiki (e.g., hide/force the table of contents).
Name | Description |
---|---|
Table of contents | |
__NOTOC__ |
Hides the table of contents (TOC). |
__FORCETOC__ |
Forces the table of contents to appear at its normal position (before the first header). |
__TOC__ |
Overriding __NOTOC__ , it places the table of contents at the words current position.
|
Editing | |
__NOEDITSECTION__ |
Hides the "Edit" links beside headings. |
__NEWSECTIONLINK__
|
Adds a link beside the "Edit" tab for adding a new section on a non-talk page. |
__NONEWSECTIONLINK__
|
Removes the link beside the "Edit" tab on pages in talk namespaces. |
Other | |
__HIDDENCAT__ |
Hides the category from the lists of categories in its members and parent categories. You can go to your Preferences to show the hidden categories on articles. |
__NOINDEX__ |
Tells search engines (like Google/Bing) to not index the page. |
__DISAMBIG__ |
Identifies an article as a disambiguation page. |
__NOTITLE__ |
Hides the title for a page. Mostly used on the main page. |
Variables
Dates/Time
Name | Description |
---|---|
{{CURRENTYEAR}} |
|
{{CURRENTMONTH}} |
|
{{CURRENTMONTH1}} |
|
{{CURRENTMONTHNAME}} |
|
{{CURRENTMONTHNAMEGEN}} |
|
{{CURRENTMONTHABBREV}} |
|
{{CURRENTDAY}} |
|
{{CURRENTDAY2}} |
|
{{CURRENTDOW}} |
|
{{CURRENTDAYNAME}} |
|
{{CURRENTTIME}} |
|
{{CURRENTHOUR}} |
|
{{CURRENTWEEK}} |
|
{{CURRENTTIMESTAMP}} |
Number of pages
Name | Description |
---|---|
{{NUMBEROFPAGES}} |
|
{{NUMBEROFARTICLES}} |
|
{{NUMBEROFFILES}} |
|
{{NUMBEROFEDITS}} |
|
{{NUMBEROFUSERS}} |
|
{{NUMBEROFADMINS}} |
|
{{NUMBEROFACTIVEUSERS}} |
|
{{NUMBEROFCONTRIBUTORS}} |
|
{{PAGESINCATEGORY:categorynamehere}} |
|
{{PAGESINCATEGORY:categorynamehere|all}} |
|
{{PAGESINCATEGORY:categorynamehere|pages}} |
|
{{PAGESINCATEGORY:categorynamehere|subcats}} |
|
{{PAGESINCATEGORY:categorynamehere|files}} |
|
{{NUMBERINGROUP:groupnamehere}} |
Page
Name | Description |
---|---|
{{FULLPAGENAME}} |
Full title |
{{PAGENAME}} |
Full title |
{{BASEPAGENAME}} |
Base page title |
{{SUBPAGENAME}} |
Subpage title |
{{SUBJECTPAGENAME}} |
Associated subject page |
{{ARTICLEPAGENAME}} |
Associated subject page |
{{TALKPAGENAME}} |
Associated talk page |
{{ROOTPAGENAME}} |
Name of the root of the current page |