Help:Magic Words: Difference between revisions

From Iskomunidad
Jmtirao (talk | contribs)
No edit summary
Jmtirao (talk | contribs)
No edit summary
Line 2: Line 2:


Basically there are three types of magic words:
Basically there are three types of magic words:
*'''[[Help:Magic Words#Behaviour_switches|Behavior Switches]]'''. These are uppercase words surrounded by double underscores (eg __FOO__)
*'''[[Help:Magic Words#Behaviour_Switches|Behavior Switches]]'''. These are uppercase words surrounded by double underscores (eg __FOO__)
*'''[[Help:Magic Words#Variables|Variables]]'''. These are uppercase words surrounded by double braces (eg <nowiki>{{FOO}}</nowiki>).
*'''[[Help:Magic Words#Variables|Variables]]'''. These are uppercase words surrounded by double braces (eg <nowiki>{{FOO}}</nowiki>).
*'''[[Help:Magic Words#Parser_functions|Parametric or Parser Functions]]'''. These take parameters and are either of the form <nowiki>{{foo:...}}</nowiki> or <nowiki>{{#foo:...}}</nowiki>.
*'''[[Help:Magic Words#Parser_Functions|Parametric or Parser Functions]]'''. These take parameters and are either of the form <nowiki>{{foo:...}}</nowiki> or <nowiki>{{#foo:...}}</nowiki>.


__TOC__
__TOC__

Revision as of 18:59, 3 March 2009

Magic words are strings of codes which associates with a return value or function, such as time, site details, or page names. This page is about usage of standard magic words.

Basically there are three types of magic words:

Behaviour Switches

A behaviour switch controls the layout or behaviour of the page and can often be used to specify desired omissions and inclusions in the content.

Word Description
Table of contents
__NOTOC__ Hides the table of contents (TOC).
__FORCETOC__ Forces the table of content to appear at its normal position (above the first header).
__TOC__ Places a table of contents at the word's current position (overriding __NOTOC__). If this is used multiple times, the table of contents will appear at the first word's position.
Editing
__NOEDITSECTION__ Hides the section 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.
Categories
__NOGALLERY__ Used on a category page, replaces thumbnails in the category view with normal links.
__HIDDENCAT__ Used on a category page, hides the category from the lists of categories in its members and parent categories (there is an option in the user preferences to show them).
Language conversion
__NOCONTENTCONVERT__
__NOCC__
On wikis with language variants, don't perform any content language conversion (character and phase) in article display; for example, only show Chinese (zh) instead of variants like zh_cn, zh_tw, zh_sg, or zh_hk.
__NOTITLECONVERT__
__NOTC__
On wikis with language variants, don't perform language conversion on the title (all other content is converted).
Other
__START__ No effect.
__END__ Explicitly marks the end of the article, to prevent MediaWiki from removing trailing whitespace.
__INDEX__ Tell search engines to index the page.
__NOINDEX__ Tell search engines not to index the page (ie, do not list in search engines' results).
__STATICREDIRECT__ On redirect pages, don't allow wiki to automatically update the link when someone moves a page and checks "Update any redirects that point to the original title".