Template talk:If#New if
{{permprot}}
Addition of pp-template
{{editprotected}}
Based on User:Wknight94 protection, suggest adding {{tl|pp-template}} to the top of the template page Tamr007 (talk) 10:09, 10 July 2008 (UTC)
:20px Done using the unprotected documentation subpage.
Confused...
Could anyone explain me the usage of this template in the form of:
if condition then
statement1
else
statement2
I noticed that the documentation was somewhat unclear. Alexius08 is welcome to talk about his contributions. 14:13, 1 October 2008 (UTC)
:I also came here looking for this. Blue Rasberry (talk) 14:16, 11 November 2011 (UTC)
::There are several parser functions for this, depending on the kind of condition, see mw:Help:Extension:ParserFunctions. This Template:If is a special version preserving newlines and spaces.--Patrick (talk) 11:39, 27 December 2011 (UTC)
:::I can probably work out the syntax from that link, but this section
::::
::::
::::
::::
::::
::::Compare:
::::
::::
::::
::::
::::
:::Is still entirely opaque and unhelpful and needs someone with knowledge of the syntax to write in clear English what each expression is testing for and how the products are being produced. The spacing issues are entirely secondary to why most of us will be coming by here. — LlywelynII 09:36, 22 February 2014 (UTC)
If in multiple comparisons
Does anyone know how to use #if: when I want to check against multiple statements? Example:
{{#if: {{{1}}} or {{{2}}}|do this if either condition is met|do that if condition is not met}}
Say i want to check e.g. whether 1 OR 2 is not an empty value in an infobox, how to accomplish that? The example i have does not work. There appaerently is a problem with multiple conditions? Or do i miss something? Regards, DTBone (talk) 18:18, 11 October 2008 (UTC)
:The parser function does not check params, you can use both together e.g
:#
:#
:#
:you can also nest a parser function in another:
:#
:r0x timing of de response imo -- 120.17.76.106 (talk) 11:21, 24 January 2009 (UTC)