[Mediawiki-l] conditional statement in version 1.5.8 ??? (Template:Qif won't work)

Erik Mermagen mermagen at earthlink.net
Sun Apr 9 03:23:00 UTC 2006


Does anyone here know how to create a conditional statement in version 
1.5.8 that I could use in a template?

if the stated variable is not defined
WHAT I WANT IS TO HAVE A TABLE ROW NOT APPEAR IF A STATED VARIABLE IS 
NOT DEFINED.

For EXAMPLE:

"if" {{{lubrication}}} !null (is something) "then"
       <TR>
         <td><strong>[[Lubrication]]:</strong></TD>
         <TD>{{{lubrication}}}</TD>
       </TR>
"else" don't show the table row at all. Leave that alone and continue 
to the next conditional statement.

Another EXAMPLE would be On this page:
http://wikimoto.org/wikimoto/index.p...onda_CBR1100XX
  You can see the specifications table that is created by this template:
http://wikimoto.org/wikimoto/index.p...Template:Specs
  If you notice, the "Lubrication" variable definition is missing 
because I have not defined the variable in the code. Since that is the 
case, I would like that row to NOT appear in the table.

Another EXAMPLE would be if I have this code in my page I don't want 
ANY of the rows to appear:
{{Specs|
category= |
msrp= |
engine_type= |
displacement= |
compression_ratio= |
fuel_system= |
ignition_system= |
cooling_system= |
lubrication= |
bore_stroke= |
starter= |
transmission= |
final_drive= |
more_details= |
lxwxh= |
dry_weight= |
wet_weight= |
wheelbase= |
seat_height= |
fuel_capacity= |
front_suspension= |
rear_suspension= |
front_brakes= |
rear_brakes= |
tires= |
rake= |
trail= |
power= |
torque= |
top_speed= |
quarter_mile= |
power_weight= |
}}

Thanks ahead of time for even reading this.
Erik Mermagen


More information about the MediaWiki-l mailing list