Jump to content

Template talk:Ifor

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Template talk:Ifor/doc)

Logic function: logical disjunction

Form: If Parameter1 = x Or Parameter2 = y Then a Else b

Syntax: {{Ifor|test1=Parameter1|val1=x|test2=Parameter2|val2=y|then=a|else=b}}

Examples

[edit]
Code Returns

{{Ifor|test1=foo|val1=foo|test2=bar|val2=bar}}
Code Returns

{{Ifor|test1=foo|val1=foo|test2=bar|val2=foo}}
Code Returns

{{Ifor|test1=foo|val1=bar|test2=bar|val2=bar}}
Code Returns

{{Ifor|test1=foo|val1=bar|test2=bar|val2=foo}}
Code Returns

{{Ifor|test1=foo|val1=foo|test2=bar|val2=bar|then=foobar!|else=no foobar today}}
foobar!
Code Returns

{{Ifor|test1=foo|val1=nope|test2=bar|val2=nope|then=foobar!|else=no foobar today}}
no foobar today

Revise

[edit]

At current, this template serves too limited a scope for practical use. If no one has any qualms with it, I'll revise this template to compare a multitude of parameters (20 or 30). hornoir (talk) 23:34, 20 February 2009 (UTC)[reply]

Done. Accepts up to 30 test and val parameters now. It remains different from {{ifeqany}} since it has no default output for then or else and it remains different from {{ifequal}} since it has output parameters. hornoir (talk) 13:06, 21 February 2009 (UTC)[reply]

New parameter

[edit]

@Alfakim, Ligulem, and Hornoir:

Hi,

I imported the template into fr:Wiki and added a "valall" parameter which lead to all strings being compared to vallall. You may be interested in importing it into en:Wiki, I did not change anything else.

Arflhn (talk) 17:30, 19 November 2020 (UTC)[reply]