No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
− | '''{{{1|}}}: '''{{#ifeq:{{{default|}}}|yes|<abbr title="This gadget is enabled by default.">''Default gadget''</abbr>. }}{{{2|}}}<sup><nowiki>[</nowiki>''[[MediaWiki:Gadget-{{{3|}}}.js|source]]''<nowiki>]</nowiki></sup><noinclude> |
+ | '''{{{1|}}}: '''{{#ifeq:{{{default|}}}|yes|<abbr title="This gadget is enabled by default.">''Default gadget''</abbr>. }}{{{2|}}}<sup><nowiki>[</nowiki>''[[MediaWiki:Gadget-{{{3|}}}.js|source]]''<nowiki>]</nowiki></sup><noinclude>{{doc}}</noinclude> |
Revision as of 23:45, 20 October 2015
: [source]
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 {{iwlink|gphelp|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 {{iwlink|gphelp|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 {{iwlink|gphelp|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] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the {{iwlink|gphelp|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.[source] |
{{gadget|Preview Tab|Re-adds the Wikitext/Preview/Changes tabs to editor that were removed in the {{iwlink|gphelp|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.[source] |