Help:Magic words: Difference between revisions
Appearance
Created page with "'''Magic words''' are strings of text that have special meaning within the wiki context. This page explains the commonly used magic words on the NixOS Wiki. For a comprehensive list of magic words available on a MediaWiki installation, see [https://www.mediawiki.org/wiki/Help:Magic_words the MediaWiki help page]; for developer documentation related to adding a new magic word, see [https://www.mediawiki.org/wiki/Manual:Magic_words the MediaWiki manual page]...." |
(No difference)
|
Latest revision as of 13:46, 10 June 2025
Magic words are strings of text that have special meaning within the wiki context. This page explains the commonly used magic words on the NixOS Wiki. For a comprehensive list of magic words available on a MediaWiki installation, see the MediaWiki help page; for developer documentation related to adding a new magic word, see the MediaWiki manual page.
There are three main types of magic words available on this wiki:
- Behaviour switches that change the display of a page;
- Variables, which might look like templates when invoked;
- Parser functions, which take parameters and return a value. They also resemble templates; for a more comprehensive overview see the ParserFunctions extension.
Magic Word | Description |
---|---|
Articles | |
__NOTOC__
|
Hides the table of contents on a page |
__NOEDITSECTION__
|
Hides the edit link besides a section's header |
__NEWSECTIONLINK__
|
Adds a new link at the top of the page, next to the "Edit" link, to add a new section to the page, similar to how new threads are added in talk pages |
__NONEWSECTIONLINK__
|
Removes the add a new section link next to "Edit" link in talk pages |
Categories | |
__NOGALLERY__
|
Used in category pages, removes thumbnails and provides regular links. |
__HIDDENCAT__
|
Hides the category from being displayed at the end of the articles in this category. Useful for maintenance categories. |
__EXPECTUNUSEDCATEGORY__
|
When used on a category, removes it from Special:UnusedCategories even when it's empty. |
Miscellaneous | |
__INDEX__
|
Tells search engines to index this page, regardless of wiki-wide settings. Note: robots.txt and the sitemap would still need to be configured, this shouldn't be used manually 99% of the time |
__NOINDEX__
|
Tells search engines not to index this page |
__STATICREDIRECT__
|
On redirect pages, prevents the redirect link from being updated when the user moves the page. |
__EXPECTUNUSEDTEMPLATE__
|
Removes the template from Special:UnusedTemplates even if no page includes it. |