Template:Infobox: Difference between revisions
From Elwiki
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{{{colset| | <includeonly>{{#vardefine:colset|{{{colset|}}}}}{{#if:{{{color|}}} | ||
|{{#vardefine:color| background-color: {{{color}}};}} | |{{#vardefine:color| background-color: {{{color}}};}} | ||
}}<table class="infobox {{{class|}}}" style="{{{style|}}}"> | }}<table class="infobox {{{class|}}}" style="{{{style|}}}"> | ||
<tr style="{{#var:color|}}" class="textfloat"> | <tr style="{{#var:color|}}" class="textfloat"> | ||
<th class="title" colspan="{{#expr:{{ | <th class="title" colspan="{{#expr:{{#var:colset|1}}+1}}">{{{title|}}}</th> | ||
</tr> | </tr> | ||
{{#if:{{{image|}}} | {{#if:{{{image|}}} | ||
|<tr> | |<tr> | ||
<td class="image" colspan="{{#expr:{{ | <td class="image" colspan="{{#expr:{{#var:colset|1}}+1}}"><center>{{{image}}}</center></td> | ||
</tr> | </tr> | ||
}} | }} | ||
Line 15: | Line 15: | ||
| | | | ||
{{#if:{{{set{{#var:key|}}|}}} | {{#if:{{{set{{#var:key|}}|}}} | ||
| {{#vardefine:div|{{#expr:{{ | | {{#vardefine:div|{{#expr:{{#var:colset|1}}/{{{set{{#var:key|1}}|}}}}}}} | ||
<tr class="entry"> | <tr class="entry"> | ||
<th>{{#var:val|}}</th> | <th>{{#var:val|}}</th> | ||
Line 28: | Line 28: | ||
|<tr class="entry"> | |<tr class="entry"> | ||
<th>{{#var:val|}}</th> | <th>{{#var:val|}}</th> | ||
<td colspan="{{ | <td colspan="{{#var:colset|1}}">{{{data{{#var:key|}}|}}}</td> | ||
</tr> | </tr> | ||
}} | }} |