Difference between revisions of "Template:Event preview infobox"

added parameter |use jp =
(added parameter |use jp =)
Line 51: Line 51:
}}{{#if:{{#var:event subobj}}|<table id="event{{#eventnumber}}" class="preview-infobox">
}}{{#if:{{#var:event subobj}}|<table id="event{{#eventnumber}}" class="preview-infobox">
<tr>
<tr>
   <th colspan="2">[[{{#var:event subobj}}|{{{en name|{{{jp name|???}}}}}}]]</th>
   <th colspan="2">[[{{#var:event subobj}}|{{#ifeq:{{{use jp|false}}}|{{{en name|false}}}|
  {{#show:{{#var:event subobj}}|?Has English name}}|{{#ifeq:{{{use jp|}}}|{{{jp name|true}}}|
  {{#show:{{#var:event subobj}}|?Has Japanese name}}|{{{en name|{{{jp name|???}}}}}}}}
}}]]</th>
</tr>
</tr>
<tr>
<tr>
Line 125: Line 128:
| banners =  
| banners =  
| floats =
| floats =
| use jp =
}}</pre>
}}</pre>
=== Parameters ===
=== Parameters ===
Line 132: Line 136:
; banners : Number of banners to show; defaults to 1. Provide 0 to show all.
; banners : Number of banners to show; defaults to 1. Provide 0 to show all.
; floats : Determines if it should float to the right; only "true" enables it.
; floats : Determines if it should float to the right; only "true" enables it.
; use jp : For the title: uses the JP name if en name is provided if true; uses the EN name if jp name is provided if false.


=== Examples ===
=== Examples ===