[Mediawiki-l] What is the code for an if-else statement?

Kalan kalan.001 at gmail.com
Sun Jan 11 12:00:47 UTC 2009

Ehrm. #if checks whether a string is empty or not, your ==s will not work here.

The syntax is:
{{#if:whatsoever|non-empty|empty (optional)}}
But what you need is:
{{#ifeq:string1|string2|equal|non-equal (optional)}}

By the way, you may want to create a sub-template for one line of an
infobox and reuse it.

— Kalan

More information about the MediaWiki-l mailing list