Difference between revisions of "Vorlage:If"
From Wikivoyage association
m (1 Versionen) |
RolandUnger (Talk | contribs) m |
||
Line 6: | Line 6: | ||
Please use the parser function #if instead of this template. | Please use the parser function #if instead of this template. | ||
</div> | </div> | ||
− | <div | + | <div class="framedBox"> |
==de:== | ==de:== | ||
* '''Funktion:''' Diese Vorlage dient dazu, bedingte Anweisungen in Vorlagen definieren zu können. Diese Vorlage wird nicht alleinig, also ohne Elternvorlage benutzt. | * '''Funktion:''' Diese Vorlage dient dazu, bedingte Anweisungen in Vorlagen definieren zu können. Diese Vorlage wird nicht alleinig, also ohne Elternvorlage benutzt. | ||
Line 13: | Line 13: | ||
** <code><nowiki>{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}</nowiki></code><br />Damit schreibt man z.B. einen optionalen rechten Rand in eine Stil-Anweisung. | ** <code><nowiki>{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}</nowiki></code><br />Damit schreibt man z.B. einen optionalen rechten Rand in eine Stil-Anweisung. | ||
</div> | </div> | ||
− | <div | + | <div class="framedBox"> |
==en:== | ==en:== | ||
* '''Function:''' This template can be used to define conditional commands in templates. This template will not be used alone but as a part of another template. | * '''Function:''' This template can be used to define conditional commands in templates. This template will not be used alone but as a part of another template. | ||
Line 20: | Line 20: | ||
** <code><nowiki>{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}</nowiki></code><br />This example demonstrates the insertion of an optional defined right margin into a style declaration. | ** <code><nowiki>{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}</nowiki></code><br />This example demonstrates the insertion of an optional defined right margin into a style declaration. | ||
</div> | </div> | ||
− | __NOTOC__ __NOEDITSECTION__ [[Category: | + | __NOTOC__ __NOEDITSECTION__ [[Category:Templates:If templates|If]]</noinclude> |
Revision as of 08:04, 27 July 2007
Hinweis / Note:
Nutzen Sie bitte die Parser-Funktion #if anstelle dieser Vorlage.
Please use the parser function #if instead of this template.
de:
- Funktion: Diese Vorlage dient dazu, bedingte Anweisungen in Vorlagen definieren zu können. Diese Vorlage wird nicht alleinig, also ohne Elternvorlage benutzt.
- Verwendung:
{{if|test=Variable|then=then-Zweig||else=Else-Zweig}}
- Beispiel:
-
{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}
Damit schreibt man z.B. einen optionalen rechten Rand in eine Stil-Anweisung.
-
en:
- Function: This template can be used to define conditional commands in templates. This template will not be used alone but as a part of another template.
- Usage:
{{if|test=variable|then=then branch||else=else branch}}
- Example:
-
{{if|test={{{r|}}}|then= margin-right: {{{r}}};|else=}}
This example demonstrates the insertion of an optional defined right margin into a style declaration.
-