Zum Inhalt springen

Vorlage:Template shortcut/Doku: Unterschied zwischen den Versionen

Documenting the additional parameters and some other fixes.
imported>Davidgothberg
(Modernising the doc page header. Added "see also" to the other shortcut templates. And some other fixes.)
imported>Davidgothberg
(Documenting the additional parameters and some other fixes.)
Zeile 2: Zeile 2:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->


This template provides the names of shortcuts to a template, specified by a parameter. For example, if you want to indicate that {{tl|uw-vandalism1}}'s shortcuts are {{tl|uw-v1}}, {{tl|uw-vandal1}}, and {{tl|uw-vand1}}, you could use one of:
This template can be used to show the names of shortcuts to a template.
 
This template can take up to '''three''' shortcuts as parameters.
 
If you want to indicate that {{tl|uw-vandalism1}} has shortcuts named {{tl|uw-v1}}, {{tl|uw-vandal1}}, and {{tl|uw-vand1}}, then you could use one of:


{{template shortcut|uw-v1}}
{{template shortcut|uw-v1}}
Zeile 14: Zeile 18:
{{template shortcut|uw-v1|uw-vand1|uw-vandal1}}
{{template shortcut|uw-v1|uw-vand1|uw-vandal1}}
* {{tlc|template shortcut|uw-v1|uw-vand1|uw-vandal1}}
* {{tlc|template shortcut|uw-v1|uw-vand1|uw-vandal1}}
{{clear}}
=== Additional parameters ===
This template has some additional parameters.
"float=left" makes this template flow to the left of the page instead:
{{template shortcut/sandbox | float=left | uw-v1 }}
<code><nowiki>{{template shortcut/sandbox | float=left | uw-v1 }}</nowiki></code>
{{clear}}
"pre=something", "pre1=something" and "pre2=something" feeds some text to show before the shortcut links but within the braces. This is mostly used to indicate that the template should be used with substitution. Then you can do like this:
{{template shortcut/sandbox | pre=subst: | uw-v1 | uw-vand1 }}
<code><nowiki>{{template shortcut/sandbox | pre=subst: | uw-v1 | uw-vand1 }}</nowiki></code>
{{clear}}
{{template shortcut/sandbox | uw-v1 | pre2=subst: | uw-vand1 | pre3=subst: | uw-vandal1 }}
<code><nowiki>{{template shortcut/sandbox | uw-v1 | pre2=subst: | uw-vand1 | pre3=subst: | uw-vandal1 }}</nowiki></code>
{{clear}}
{{clear}}


Anonymer Benutzer