Vorlage:Ifl: Unterschied zwischen den Versionen

Aus FürthWiki

(Die Seite wurde neu angelegt: „<includeonly>{{#switch:{{{1|}}}|ja={{{2|}}}|Ja={{{2|}}}|wahr={{{2|}}}|Wahr={{{2|}}}|true={{{2|}}}|{{{3|}}}}}</includeonly><noinclude> <templatedata> { "params": { "1": { "label": "Prüf-Wert", "description": " ", "type": "line", "required": true }, "2": { "label": "Wahr-Wert", "description": " ", "type": "string" }, "3": { "label": "Falsch-Wert", "description": " " } }, "description": "Diese Vorlage entspricht ein…“)
 
(content)
Zeile 6: Zeile 6:
"label": "Prüf-Wert",
"label": "Prüf-Wert",
"description": " ",
"description": " ",
"type": "line",
"type": "content",
"required": true
"required": true
},
},
Zeile 12: Zeile 12:
"label": "Wahr-Wert",
"label": "Wahr-Wert",
"description": " ",
"description": " ",
"type": "string"
"type": "content"
},
},
"3": {
"3": {
"label": "Falsch-Wert",
"label": "Falsch-Wert",
"description": " "
"description": " ",
"type": "content"
}
}
},
},

Version vom 12. August 2025, 06:46 Uhr

Diese Vorlage entspricht einem #if:, aber mit logischer Auswertung. ja, Ja, wahr, Wahr, true werden als "Wahr" erkannt, aber alles andere als "Falsch".

Vorlagenparameter

ParameterBeschreibungTypStatus
Prüf-Wert1

Wikitexterforderlich
Wahr-Wert2

Wikitextoptional
Falsch-Wert3

Wikitextoptional

Tests

  • -{{Ifl|ja|Ja-Wert|Nein-Wert}}- ergibt -Ja-Wert-
  • -{{Ifl|Ja|Ja-Wert|Nein-Wert}}- ergibt -Ja-Wert-
  • -{{Ifl|wahr|Ja-Wert|Nein-Wert}}- ergibt -Ja-Wert-
  • -{{Ifl|Wahr|Ja-Wert|Nein-Wert}}- ergibt -Ja-Wert-
  • -{{Ifl|true|Ja-Wert|Nein-Wert}}- ergibt -Ja-Wert-
  • -{{Ifl||Ja-Wert|Nein-Wert}}- ergibt -Nein-Wert-
  • -{{Ifl||Ja-Wert}}- ergibt --
  • -{{Ifl|||Nein-Wert}}- ergibt -Nein-Wert-
  • -{{Ifl|||}}- ergibt --
  • -{{Ifl|ja||Nein-Wert}}- ergibt --