[Mediawiki-l] template table - "if" variable definition exists "then" display row "else" do nothing

Erik Mermagen mermagen at earthlink.net
Sat Apr 8 19:35:29 UTC 2006


I cannot upgrate to MW 1.6 due to MySQL version on my server. Thus, I 
cannot use the Template:Qif
I would like however, to create templates with tables in them that only 
display the table row if the variable in them is defined. Something 
like:

{{qif|test={{{LxWxH |}}}|then=<tr><th 
style="text-align:right;">Dimensions</th><td>{{{LxWxH}}}</td></tr>}}

in this example the row:
  <tr><th style="text-align:right;"> Dimensions 
</th><td>{{{LxWxH}}}</td></tr>
would only display if the variable "LxWxH" was defined

Can't use qif tho. Any ideas on how to do this in version 1.5.8?
Thanks,
Erik




More information about the MediaWiki-l mailing list