Template:Gadget
Jump to navigation
Jump to search
Documentation The documentation below is transcluded from Template:Gadget/doc. (edit | history)
[purge]
This template is used on the description pages of gadgets to provide a standardized documentation.
Usage
{{ gadget | <name> | <description> | <internal name> | default = y/yes | nojs = y/yes | css = y/yes }}
- First unnamed parameter
Name of the gadget.
- Second unnamed parameter
Description of the gadget.
- Third unnamed parameter
Internal name of the gadget. This corresponds to the title of the gadget's MediaWiki description page, without the
part. For the Preview Tab gadget (description page: MediaWiki:Gadget-previewTab), for instance, this would be MediaWiki:Gadget-
.
previewTab
- default
Indicates that the gadget is enabled by default.
- nojs
Suppresses the "source" link that points to the gadget's JS page by default. This is useful for CSS-only gadgets.
- css
Adds a link to the gadget's style page (
).
MediaWiki:Gadget-$3.css
Examples
Code | Result |
---|---|
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the [[gphelp:MediaWiki 1.31 upgrade|MediaWiki 1.31 upgrade]].|previewTab}}
|
Preview Tab: Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the MediaWiki 1.31 upgrade.[source] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the [[gphelp:MediaWiki 1.31 upgrade|MediaWiki 1.31 upgrade]].|previewTab|default=yes}}
|
Preview Tab: Default gadget. Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the MediaWiki 1.31 upgrade.[source] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the [[gphelp:MediaWiki 1.31 upgrade|MediaWiki 1.31 upgrade]].|previewTab|css=yes}}
|
Preview Tab: Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the MediaWiki 1.31 upgrade.[source | css] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the [[gphelp:MediaWiki 1.31 upgrade|MediaWiki 1.31 upgrade]].|previewTab|nojs=yes|css=yes}}
|
Preview Tab: Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the MediaWiki 1.31 upgrade.[css] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the [[gphelp:MediaWiki 1.31 upgrade|MediaWiki 1.31 upgrade]].|previewTab|nojs=yes}}
|
Preview Tab: Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the MediaWiki 1.31 upgrade. |