Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Shortcut/doc: Difference between revisions

Template page
+sa
m duplicated parameter corr.
 
(14 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{{tsh|short}}
{{TemplateBox
{{TemplateBox
|1=1
  |1       = 1
|1d=Shortcut
  |1label  = shortcut 1
|1stat=required
  |1label-en= shortcut 1
|2=2
  |1label-de= shortcut 1
|2d=Second shortcut
  |1d-en    = Name of the first shortcut
|2stat=optional-
  |1d-de    = Name des ersten Shortcuts
|3=3
  |1type    = wiki-page-name
|3d=Second shortcut
  |1def    = <!-- default value for the parameter -->
|3stat=optional-
  |1stat   = required
|name=Shortcut
 
|desc=This template is primarily used on guideline and policy pages to show the shortest alias of a given page. For example, [[COM:VP]] redirects to [[Commons:Village Pump]].
  |2       = 2
|namespace=Commons
  |2label  = shortcut 2
|usergroup=all
  |2label-en= shortcut 2
|usage-notes=
  |2d      = Name of the second shortcut
Please '''do not use''' this template on other templates, e.g. to state that the shortcut to [[Template:Foo]] is in fact <nowiki>{{Foo}}</nowiki>. There's no need to state the obvious like that, '''each''' template uses its own name as a shortcut, by default.
  |2d-en    = Name of the second shortcut
|type=marker
  |2d-de    = Name des zweiten Shortcuts
|example=
  |2type    = wiki-page-name
|i18n-method=-
  |2def    =
|i18n-desc=Localization is via {{tl|Shortcut text}}.
  |2stat   = optional-
|seealso=* {{tl|Shortcut2}} produces a box floating to the right
 
* {{tl|Redirects}} aka [[Template:Template shortcut]]
  |3       = 3
|setscats=
  |3label  = shortcut 3
|lines=one
  |3label-en= shortcut 3
|shorthand=
  |3label-de= shortcut 3
|relieson={{tl|shortcut text}}
  |3d       = Name of the third shortcut
}}<includeonly>
  |3d-en    = Name of the third shortcut
[[Category:Header templates|{{PAGENAME}}]]
  |3d-de    = Name des dritten Shortcuts
  |3type    = wiki-page-name
  |3def    =
  |3stat   = optional-
 
  |4        = 4
  |4label  = shortcut 4
  |4label-en= shortcut 4
  |4label-de= shortcut 4
  |4d      = Name of the fourth shortcut
  |4d-en    = Name of the fourth shortcut
  |4d-de    = Name des vierten Shortcuts
  |4type    = wiki-page-name
  |4def    =
  |4stat    = optional-
 
  |5        = lang
  |5label  = language
  |5label-en= language
  |5label-de= language
  |5d    = Language of the language-dependent output of the template (e.g. “de”). Useful in other templates and translated Commons pages to provide consistent language throughout the template/page
  |5d-en    = Language of the language-dependent output of the template (e.g. “de”). Useful in other templates and translated Commons pages to provide consistent language throughout the template/page
  |5d-de    = Sprache der sprachabhängigen Ausgabe der Vorlage (z. B. „de“). Nützlich in anderen Vorlagen und übersetzten Commons-Seiten, um eine einheitliche Sprache in der Vorlage/Seite zu gewährleisten.
  |5type    = line
  |5def    =
  |5stat    = optional-
 
  |name              = shortcut
  |desc              = This template shows the shortcuts of the current page.
  |desc-en            = This template shows the shortcuts of the current page.
  |desc-de            = Diese Vorlage zeigt die Shortcuts der aktuellen Seite an.
  |namespace         =  
  |usergroup         =
  |placement          = top
  |example-value      =  
  |mustbesubst        =
  |relieson          =
  |usage-notes       =
| shorthand = short
  |setscats          =  
  |seealso            =
* {{tl|Shortcut2}} to produce a box floating right suited for shortcuts to sections
* {{tl|Redirects}} for redirects to templates
  |type               =  
  |i18n-method       = switch
  |i18n-desc         = {{LangSwitch|default=Localization by {{tl|Shortcut text}}.|en=Localization by {{tl|Shortcut text}}.|de=Lokalisierung durch {{tl|Shortcut text}}.}}
  |i18n-subpage      =
  |i18n-mediawiki-msg =
  |example            =
  |print              =
  |useTemplateData    = only
}}
{| class="wikitable"
|+ {{LangSwitch|default=Usage|de=Verwendung}}
|-
!{{LangSwitch|default=input|de=Eingabe}}
!{{LangSwitch|default=result|de=Ergebnis}}
|-
|<code style="font-size:smaller">{{tlx|shortcut|COM:COM}}</code>
|{{shortcut|demo=1|COM:COM}}
|-
|<code style="font-size:smaller">{{tlx|shortcut|COM:COM|CAT:CAT}}</code>
|{{shortcut|demo=1|COM:COM|CAT:CAT}}
|}
 
{{LangSwitch|default=The output is shown with <code>class="coordinates"</code>, see [[mediawikiwiki:Help:Page status indicators]] for details.|de=Die Ausgabe wird mit <code>class="coordinates"</code> angezeigt, siehe [[mediawikiwiki:Help:Page status indicators]] für Details.}}<includeonly>
[[Category:Header templates]]
[[Category:Internationalised header templates]]
</includeonly>
</includeonly>

Latest revision as of 17:07, 26 April 2024

This template shows the shortcuts of the current page.

Usage

{{shortcut |1= }}

Or use the shorthand

short

Template parameters

<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

This template shows the shortcuts of the current page.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
shortcut 11

Name of the first shortcut

Page namerequired
shortcut 22

Name of the second shortcut

Page nameoptional
shortcut 33

Name of the third shortcut

Page nameoptional
shortcut 44

Name of the fourth shortcut

Page nameoptional
languagelang

Language of the language-dependent output of the template (e.g. “de”). Useful in other templates and translated Commons pages to provide consistent language throughout the template/page

Lineoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

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

Placement: At the top of the page

See also

Localization

To add your language to the list of languages supported by this template, please edit the template and add a row to the "{{LangSwitch|}}" construct. It takes the form "|xx= Your translation " (xx being the code of your language)

Localization by {{Shortcut text}}.

Usage
input result
{{shortcut|COM:COM}} Shortcut: COM:COM
{{shortcut|COM:COM|CAT:CAT}} Shortcuts: COM:COM • CAT:CAT

The output is shown with class="coordinates", see mediawikiwiki:Help:Page status indicators for details.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.