This help page is a how-to guide. It details processes or procedures of some aspect(s) of Wikipedia's norms and practices. It is not one of Wikipedia's policies or guidelines, and may reflect varying levels of consensus and vetting. |
Magic words are words surrounded by brackets or underscores which most often insert or display the current value of what they are called. These include parser functions, variables and behavior switches and are features of wikitext. They are interpreted by the Metawiki software and are often used in templates so that they show different information depending on which page they are on and many other conditions.
There are three types of magic words:
__NOTOC__
((PAGENAME))
and function somewhat similarly to templates.((#expr:2+2))
subst:
keyword).For a more detailed explanation, refer to the behavior switches MediaWiki page.
__NOTOC__
(can be placed anywhere in the wikitext; prevents a table of contents)__FORCETOC__
(can be placed anywhere in the wikitext; makes a table of contents appear in its normal position)__TOC__
(places a table of contents at its position)__NOEDITSECTION__
(hides section edit links beside headings)__NEWSECTIONLINK__
(adds a "+" or "new section" link for adding a new section on a non-talk page)__NONEWSECTIONLINK__
(removes the "+" or "new section" link on "Talk" pages)__NOGALLERY__
(on category pages, replaces thumbnails with normal links)__HIDDENCAT__
(on category pages, makes it a hidden category)__INDEX__
(tells search engines to index the page (show in results))__NOINDEX__
(tells search engines not to index the page (not show in results))((DISPLAYTITLE:title))
(changes the displayed form of the page title)((DEFAULTSORT:sortkey))
(sets a default category sorting key)For documentation, you may wish to read the variables MediaWiki page.
((FULLPAGENAME))
(The page title, including namespace.)((PAGENAME))
(page title without namespace)((BASEPAGENAME))
(the page title without the current subpage or namespace — the parent page without the namespace.)((SUBPAGENAME))
(subpage part of title)((SUBJECTPAGENAME))
(associated non-talk page)((TALKPAGENAME))
(associated talk page)((NAMESPACE))
(namespace of current page)((SUBJECTSPACE)), ((ARTICLESPACE))
(associated non-talk namespace)((TALKSPACE))
(associated talk namespace)((FULLPAGENAMEE)), ((NAMESPACEE))
etc. (URL-encoded equivalents)For more detailed information on all magic words (behaviour switches, variables and parser functions), consider reading:
| |
About Wikipedia (?) | |
Help for readers (?) | |
Contributing to Wikipedia (?) | |
Getting started (?) | |
Dos and don'ts (?) | |
How-to pages and information pages (?) | |
Coding (?) | |
Directories (?) |
|
Missing Manual
(?) |
Get personal technical help at the Teahouse, help desk, village pump (technical), talk pages or IRC. | |
General technical help | |
Special page-related | |
Wikitext | |
Links and diffs | |
Media files: images, videos and sounds | |
Other graphics | |
Templates and Lua modules | |
Data structure | |
HTML and CSS | |
Customisation and tools | |
Automated editing | |
|