Help:Magic words: Difference between revisions

Content deleted Content added
m fix
 
(3 intermediate revisions by 3 users not shown)
Line 1:
{{pp-vandalism|small=yes}}
{{short description|Special markup for MediaWiki}}
{{redirect-multi|2
|WP:MAGIC|H:MW
|WikiProject Magic|Wikipedia:WikiProject Magic}}
{{redirect|H:MW|the MediaWiki Help namespace|Help:MediaWiki namespace|the MediaWiki software application|MediaWiki}}
{{for|an introduction|Help:Magic words for beginners}}{{for-multi|a more comprehensive guide|mw:Help:Magic words}}
{{Wikipedia how-to|H:MW|WP:MAGIC|WP:MAGICWORDS}}
{{Simple|Help:Magic words for beginners}}
 
'''Magic words''' (including '''parser functions''', '''variables''', and '''behavior switches''') are features of [[Help:Wiki markup|wiki markup]] that give instructions to Wikipedia's underlying [[MediaWiki]] software. For example, certain magic words are used to suppress or position the [[Wikipedia:Table of contents|table of contents]], disable [[Wikipedia:INDEXING|indexing]] by external search engines, or produce output dynamically based on the current page or on user-defined [[Help:Conditional expressions|conditional expressions]]. Some of these features are especially useful for [[WP:Templates|templates]].
Line 39 ⟶ 43:
|-
! scope="row" style="background-color:var(--background-color-neutral-subtle);" id="TOC" | <code><nowiki>__TOC__</nowiki></code>
| Places the page's [[Help:Table of contents|table of contents (TOC)]] at the word's position. This magic word does not work in skins that present the table of contents outside the article content e.g. the default [[Wikipedia:Vector 2022|Vector 2022]] skin.
|-
! scope="row" style="background-color:var(--background-color-neutral-subtle);" id="FORCETOC" | <code><nowiki>__FORCETOC__</nowiki></code>
Line 45 ⟶ 49:
|-
! scope="row" style="background-color:var(--background-color-neutral-subtle);" id="NOTOC" | <code><nowiki>__NOTOC__</nowiki></code>
| Suppresses the appearance of the page's TOC. Can be used anywhere on a page. [[Help:Mobile access|Mobile version]] use an alternative navigation scheme, which is not affected by <code><nowiki>__NOTOC__</nowiki></code>.
|-
| colspan=2 align=center style="background-color:#f1f4fd" | '''Editing'''
Line 108 ⟶ 112:
== Variables ==
{{Shortcut|WP:VAR}}
{{Redirectredirect-multi|2|WP:VAR|WP:PAGENAME|policies and guidelines with WP:*VAR shortcuts, mostly about style matters|WP:VARS|the article naming policy|Wikipedia:Article titles}}
{{Further|mw:Help:Magic words#Variables|Wikipedia:Page name#sub}}
{{Redirect|WP:VAR|policies and guidelines with WP:*VAR shortcuts, mostly about style matters|WP:VARS}}
{{Redirect|WP:PAGENAME|the article naming policy|Wikipedia:Article titles}}
 
{| class="wikitable plainrowheaders"
! scope="col" | Page name variable