Template:MWheader

Template:MWheader forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to Template:MWheader, add {{Edit request}} to this talk page, followed by a description of your request.
This interface message or skin may be documented on mediawiki.org or translatewiki.net.
Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:MWheader/doc.

Goes at the top of MediaWiki talk pages. It has several optional features. Some of these can be either the parameter name or as an unnamed parameter value. The order doesn't matter.

Usage


{{MWheader}}

  • To add a bunch of interwiki links, use {{MWheader|iw}}, which creates:
Template:MWheader forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to Template:MWheader, add {{Edit request}} to this talk page, followed by a description of your request.
This interface message or skin may be documented on mediawiki.org or translatewiki.net.
Parameter valueAs parameter nameWhat it doesNotes
-description=descriptionadds a description box-
subpagessubpages=base pagelinks to all existing subpages and sub-talkpages (collapsible)the root[1] page name is the default (example)
lang linkslang links=base pagecreates a box of links to translationsthe base page name is the default; unlike subpages, this only lists pages matching a known language code (example)
-lang links=0turns off the box of links to translations, which is shown by default
talk links[inherits from lang links]use with lang links to also list any talk pagesusually not useful, unless some exist with actual discussion and not just old translations
-keyword=subpage suffixuse with lang links to add a "suffix" to the linksfor special cases where the subpages follow a different naming convention[2] (example)
-doc=pagename or doc=noadds/changes/overrides a message about a documentation pagethis only needs to be entered manually if the doc page is not the expected subpage.[3] (example)
-mw-link=pagechanges the link to MediaWiki's manual pagepage refers to the full pagename, don't include the interwiki prefix ("mw:")
iw-creates links to 150+ other Wikimedia projectssee example above
js-adds a message about Commons:Javascript styleguidereplaces {{JS styleguide}} (example)
selectskin-inserts {{Selectskin}}-
msgmsg=titleallows you to create a collapsed table of related system messagesuses {{Msgx}} (partial example)
-m1, m2,...m6=pagenameshows the pagename as one of the "related system messages"for use with msg
gadget-adds page to Category:Gadget scriptsThese last two simply categorize the page.
user script-adds page to Category:User scriptsIt's usually better to categorize this way on talk pages where categories tend to get removed or archived.
  1. This means {{#titleparts:{{PAGENAME}}|1}}, not {{BASEPAGENAME}}, so sometimes this will list a lot more pages than you want. In that case, set it equal to the desired base page or use lang links.
  2. For example, the German (de) translation of MediaWiki:Uploadtext/ownwork is MediaWiki:Uploadtext/deownwork, so ownwork is the keyword. If not set, it will look for something ending in "/de".
  3. In the MediaWiki namespace, documentation pages were titled "/Documentation" (not "/doc"), and some still are, so this is what it looks for, however many now reside in the Help namespace. Language link subpages are titled "/lang" (same as templates).
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData

TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.


Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either ‎useTemplateData=1 or ‎useTemplateData=only on the ‎/doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.

Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.


Wikipedia's help about TemplateDataCommons-specific information

Category:Templates using TemplateData

Goes at the top of MediaWiki talk pages. It has several optional features. Some of these can be either the parameter name or as an unnamed parameter value. The order doesn't matter.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Positional parameters1 2 3 4 5 6 7 8 9

subpages
Links to all existing subpages and sub-talkpages (collapsible)
lang links
Creates a box of links to translations
The base page name is the default; unlike subpages, this only lists pages matching a known language code
talk links
Use with lang links to also list any talk pages
Usually not useful, unless some exist with actual discussion and not just old translations
iw
Creates links to 150+ other Wikimedia projects
js
Adds a message about “Commons:Javascript styleguide”
Replaces {{JS styleguide}}
selectskin
Inserts {{Selectskin}}
msg
Allows you to create a collapsed table of related system messages
Uses {{msgx}}

These last two simply categorize the page.

It's usually better to categorize this way on talk pages where categories tend to get removed or archived.

gadget
Adds page to “Category:Gadget scripts”
user script
Adds page to Category:User scripts

Suggested values
subpages lang links talk links iw js selectskin msg gadget user script
Stringoptional
Descriptiondescription

Adds a description box

Contentoptional
Subpagessubpages

Links to all existing subpages and sub-talkpages (collapsible) of the target page.

Default
{{BASEPAGENAME}}
Page nameoptional
Language Linkslang links

Creates a box of links to translations to the target MediaWiki message, set to “0” to turn off the box of links to translations, which is shown by default.

Unlike subpages, this only lists pages matching a known language code.

Suggested values
0
Stringoptional
Documentation pagedoc

Adds/changes/overrides a message about a documentation page. Set to “no” to disable the message entirely.

This only needs to be entered manually if the doc page is not the expected subpage.

Suggested values
no
Default
{{SUBJECTPAGENAME}}/Documentation
Page nameoptional
MediaWiki Documentation Linkmw-link

Changes the link to MediaWiki's manual page on the MediaWiki wiki.

Must be the full page name without the “mw:” interwiki prefix.

Stringoptional
Related Messagesmsg

Allows you to create a collapsed table of related system messages with the supplied title

Lineoptional
Related Message 1m1

First related message without the “MediaWiki:” namespace prefix

Stringoptional
Related Message 2m2

Second related message without the “MediaWiki:” namespace prefix

Stringoptional
Related Message 3m3

Third related message without the “MediaWiki:” namespace prefix

Stringoptional
Related Message 4m4

Fourth related message without the “MediaWiki:” namespace prefix

Stringoptional
Related Message 5m5

Fifth related message without the “MediaWiki:” namespace prefix

Stringoptional
Related Message 6m6

Sixth related message without the “MediaWiki:” namespace prefix

Stringoptional
Subpage Suffixkeyword

Use with lang links to add a "suffix" to the links

For special cases where the subpages follow a different naming convention

Unknownoptional

The template takes no parameters.

Additional information

The template is intended to be used in the following namespaces: the MediaWiki talk namespace

The template is intended to be used by the following user groups: no user group specified

Placement: At the top of the page

Localization

العربية  български  català  dansk  Deutsch  English  español  فارسی  français  עברית  हिन्दी  magyar  Bahasa Indonesia  italiano  日本語  latviešu  македонски  മലയാളം  မြန်မာဘာသာ  Nederlands  polski  português  português do Brasil  русский  slovenščina  svenska  українська  Tiếng Việt  中文

This template makes use of {{Autotranslate}} and the translate extension.


This template is autotranslated a little differently than others. Only the text is switched out based on the user's interface, not the whole template. Keep in mind this is still a work in progress and new text fields may be added in the future.

Category:Templates using the Translate extension for internationalisation
Category:Internationalised header templates#MWheader Category:Protection templates#MWheader
Category:Internationalised header templates Category:Protection templates Category:Templates using TemplateData Category:Templates using the Translate extension for internationalisation