Vorlage:Template shortcut/Doku: Unterschied zwischen den Versionen

Aus skandinavien-wiki.net
imported>DixonDBot
K (Migrating 8 interwiki links, now provided by Wikidata on d:Q8116827)
K (50 Versionen von wikivoyage:Vorlage:Template_shortcut/Doku importiert)
 
(10 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
{{Documentation subpage}}
{{Dokumentation Unterseite}}
{{tsh|tsh}}
{{Template shortcut|Tsh}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
{{Benutzt Templatestyles|Vorlage:Shortcut/styles.css}}
This template shows shortcuts (= redirects) to a template, like the box appearing at the right. {{tl|Tsh}} is a shortcut to {{<nowiki />template shortcut}}.


== Usage ==
Die Vorlage verweiste auf eine Kurzform (Shortcut) einer Vorlage, wie in der Box hier rechts dargestellt.
===Which to show?===
Although the template can show up to ten aliases, editors are ''encouraged to choose well'' which ones to display. Even if many redirects exist, ''two or three at the most'' is almost always enough, and by keeping the number small, it facilitates remembering them, and the situation is kept well organized.  


List others in the "aliases" section of the [[Wikipedia:Template documentation|template documentation]]. Again, not all of them need to be listed; some shortcuts are there just for historical reasons, and others differ only in whitespaces or in capitalization. Such names are usually better to hide.
== Verwendung ==


Place this template at the top of the template documentation page.
Die Vorlage kann bis zu zehn Aliase anzeigen, aber man sollte die ANzahl auf ein vernünftiges Maß reduzieren, schließlich kann sich auch niemand diese ganze Menge merken. Bitte füge die Vorlage immer am Anfang einer Vorlagendokumentation ein. Prüfe auch, ob alle ALiase auf [[Wikivoyage:Shortcuts]] gelistet sind.


===Optional parameters===
* {{Tlc|Template shortcut|{{Var|pre{{=}}Präfix1}}|shortcut1|{{Var|pre2{{=}}Präfix1}}|shortcut2|...}}
This template has several optional parameters:
'''optionale Parameter:'''
* '''float''' – if set to "left", then the box will float to the left of the page, instead of the default float "right".
* {{Para|float|left}} – blendet die Box auf der linken Seite ein (Standard ist rechts)
* '''pre, pre2, pre3 ... up to pre10''' – can be used to show some text before the shortcut links, but within the braces. This is mostly used to indicate that the template should be used with substitution.  
* {{Para|pre}}, {{Para|pre2}}, ... bis {{Para|pre10}} − gibt einen Text vor dem Link, aber innerhalb der Klammern aus. Dies wird oft genutzt, um Substitution darzustellen.


==Examples==
== Beispiele==
===Basic===
For one template shortcut named {{tl|uw-v1}}:


{{tlc|template shortcut|uw-v1}}
{{Tlc|Template shortcut|tsh}}
{{template shortcut|uw-v1}}
{{Template shortcut|tsh}}
{{clear}}
{{-}}


To indicate that {{tl|uw-vandalism1}} has three shortcuts named: {{tl|uw-v1}}, {{tl|uw-vand1}}, and {{tl|uw-vandal1}}; then the following code may be used:
{{Tlc|Template shortcut|tsh|sc}}
{{Template shortcut|tsh|sc}}
{{-}}


{{tlc|template shortcut|uw-v1|uw-vand1|uw-vandal1}}
{{template shortcut|uw-v1|uw-vand1|uw-vandal1}}
{{clear}}


=== With additional parameters ===
<code><nowiki>{{Template shortcut|tsh|pre2=subst:|sc}}</nowiki></code>
Using {{para|float|<var>left</var>}} makes this template flow to the left of the page:
{{Template shortcut|tsh|pre2=subst:|sc}}
{{-}}


<code><nowiki>{{template shortcut|float=left|uw-v1}}</nowiki></code>
== Individuelle Gestaltung ==
{{template shortcut|float=left|uw-v1}}
Die Einbindung der Sprachvorlage lässt sich über [[w:Cascading Style Sheets|CSS]] individuell gestalten, entweder zentral über die Systemdatei [[Vorlage:Shortcut/styles.css]] oder benutzerspezifische Einstellungen [[Special:MyPage/common.css|''Benutzer:<Dein Name>/common.css'']]. Für Programmierer ist es damit auch möglich an jedem Feld per [[w:de:Javascript|Javascript]] Änderungen vorzunehmen und Werkzeuge zu programmieren. Folgende Klassen wurde verwendet:
{{clear}}
* {{Code|.voy-shortcut-box}} – Klasse für alle Shortcut-Boxen
* {{Code|.voy-template-shortcut-box}} – Zusätzliche Klasse für die Template-Shortcuts


Using {{para|pre2|<var>subst:</var>}} and {{para|pre3|<var>subst:</var>}} will show "subst:" before the shortcut links, but within the braces. For example:
Hier ein Beispiel zur Anwendung:
* <code><nowiki>.voy-shortcut-box { display: none; }</nowiki></code> – Unterdrückt die Ausgabe der Shortcutbox


<code><nowiki>{{template shortcut|uw-v1|pre2=subst:|uw-vand1|pre3=subst:|uw-vandal1}}</nowiki></code>
== Siehe auch ==
{{template shortcut|uw-v1|pre2=subst:|uw-vand1|pre3=subst:|uw-vandal1}}
* {{Tl|Shortcut}} – Allgemeine Vorlage für Shortcuts
{{clear}}
* [[Wikivoyage:Shortcuts]] Liste mit alle Abkürzungen, die auf Wikivoyage verfügbar sind.
 
== See also ==
* {{tl|policy shortcut}} – for shortcuts to sections of policy pages
* {{tl|shortcut}} – the normal shortcut
* {{tl|shortcut-l}} for left aligned normal shortcuts


<includeonly>
<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
<!-- Kategorien bitte hier, Interwiki-Links bitte nach Wikidata -->
[[Category:Disambiguation and redirection templates]]
[[Kategorie:Vorlagen:Formatierungshilfe]]
[[Category:Template documentation]]
 
</includeonly>
</includeonly>

Aktuelle Version vom 11. Februar 2023, 21:40 Uhr

Die Vorlage verweiste auf eine Kurzform (Shortcut) einer Vorlage, wie in der Box hier rechts dargestellt.

Verwendung

Die Vorlage kann bis zu zehn Aliase anzeigen, aber man sollte die ANzahl auf ein vernünftiges Maß reduzieren, schließlich kann sich auch niemand diese ganze Menge merken. Bitte füge die Vorlage immer am Anfang einer Vorlagendokumentation ein. Prüfe auch, ob alle ALiase auf Wikivoyage:Shortcuts gelistet sind.

  • {{Template shortcut|pre=Präfix1|shortcut1|pre2=Präfix1|shortcut2|...}}

optionale Parameter:

  • |float=left – blendet die Box auf der linken Seite ein (Standard ist rechts)
  • |pre=, |pre2=, ... bis |pre10= − gibt einen Text vor dem Link, aber innerhalb der Klammern aus. Dies wird oft genutzt, um Substitution darzustellen.

Beispiele

{{Template shortcut|tsh}}


{{Template shortcut|tsh|sc}}



{{Template shortcut|tsh|pre2=subst:|sc}}


Individuelle Gestaltung

Die Einbindung der Sprachvorlage lässt sich über CSS individuell gestalten, entweder zentral über die Systemdatei Vorlage:Shortcut/styles.css oder benutzerspezifische Einstellungen Benutzer:<Dein Name>/common.css. Für Programmierer ist es damit auch möglich an jedem Feld per Javascript Änderungen vorzunehmen und Werkzeuge zu programmieren. Folgende Klassen wurde verwendet:

  • .voy-shortcut-box – Klasse für alle Shortcut-Boxen
  • .voy-template-shortcut-box – Zusätzliche Klasse für die Template-Shortcuts

Hier ein Beispiel zur Anwendung:

  • .voy-shortcut-box { display: none; } – Unterdrückt die Ausgabe der Shortcutbox

Siehe auch

  • {{Shortcut}} – Allgemeine Vorlage für Shortcuts
  • Wikivoyage:Shortcuts – Liste mit alle Abkürzungen, die auf Wikivoyage verfügbar sind.