Difference between revisions of "Template:Infobox"

From Kerbal Space Program Wiki
Jump to: navigation, search
(+center the extra images;)
m (*show image description only if image is present;)
Line 41: Line 41:
 
| colspan="3" style="background: #ccc; font-size: large; padding: .3em; text-align: center; font-weight: bold;"| {{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}
 
| colspan="3" style="background: #ccc; font-size: large; padding: .3em; text-align: center; font-weight: bold;"| {{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}
 
|-
 
|-
{{#ifeq: {{{file|}}}|none||{{!}} {{#if: {{{file style|}}}|style="{{{file style}}}"}} colspan="3" {{!}} [[File:{{#if: {{{file|}}}|{{{file}}}|Image needed.svg}}|{{#expr: {{{width|200}}} - 10}}x{{#expr: {{{width|200}}} - 10}}px|center|{{{hovertext|{{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}}}}]]}}{{if||{{{thumb|}}}|
+
{{#ifeq: {{{file|}}}|none||{{!}} {{#if: {{{file style|}}}|style="{{{file style}}}"}} colspan="3" {{!}} [[File:{{#if: {{{file|}}}|{{{file}}}|Image needed.svg}}|{{#expr: {{{width|200}}} - 10}}x{{#expr: {{{width|200}}} - 10}}px|center|{{{hovertext|{{#if: {{{name|}}}|{{{name}}}|{{BASEPAGENAME}}}}}}}]]{{if||{{{thumb|}}}|
 
{{Infobox/Line|style=text-align:center;|{{{thumb}}} }} }}{{if||{{{file extra1|}}}|
 
{{Infobox/Line|style=text-align:center;|{{{thumb}}} }} }}{{if||{{{file extra1|}}}|
{{{!}} style=text-align:center;
+
{{(!}} style=text-align:center;
 
{{!}} [[File:{{{file extra1}}}|{{#expr: {{{width|200}}} / 2 - 10}}x{{#expr: {{{width|200}}} / 2 - 10}}px|center|{{#if: {{{thumb extra1|}}}|{{{thumb extra1}}}}}]]
 
{{!}} [[File:{{{file extra1}}}|{{#expr: {{{width|200}}} / 2 - 10}}x{{#expr: {{{width|200}}} / 2 - 10}}px|center|{{#if: {{{thumb extra1|}}}|{{{thumb extra1}}}}}]]
 
{{!}} {{#if: {{{file extra2|}}}|[[File:{{{file extra2}}}|{{#expr: {{{width|200}}} / 2 - 10}}x{{#expr: {{{width|200}}} / 2 - 10}}px|center|{{#if: {{{thumb extra2|}}}|{{{thumb extra2}}}|}}]]}}
 
{{!}} {{#if: {{{file extra2|}}}|[[File:{{{file extra2}}}|{{#expr: {{{width|200}}} / 2 - 10}}x{{#expr: {{{width|200}}} / 2 - 10}}px|center|{{#if: {{{thumb extra2|}}}|{{{thumb extra2}}}|}}]]}}
 
{{!}}-
 
{{!}}-
 
{{!}} {{#if: {{{thumb extra1|}}}|{{{thumb extra1}}}}}
 
{{!}} {{#if: {{{thumb extra1|}}}|{{{thumb extra1}}}}}
{{!}} {{#if: {{{file extra2|}}}|{{#if: {{{thumb extra2|}}}|{{{thumb extra2}}}}}}}
+
{{!}} {{#if: {{{file extra2|}}}|{{#if: {{{thumb extra2|}}}|{{{thumb extra2}}} }} }}
{{!}}}}}
+
{{!}}} }} }}
 
{{{lines}}}
 
{{{lines}}}
 
{{#if: {{{notes|}}}|{{!}}-
 
{{#if: {{{notes|}}}|{{!}}-

Revision as of 12:49, 17 December 2014

Infobox (name)
Hover Text (hovertext)
Homemade Image Subtitle
One Column
Two Columns
And Three
Columns
Multiple Types (Type 1) Value 1
(Type 2) Value 2
Homemade Footer

Annotations & Footnotes (notes)

This is a general infobox template, based on the old versions of {{Infobox/Part}} (Partbox) and {{Infobox/Body}} (Planetbox). See Template talk:Infobox/Part for more information about the new infoboxes.

Template:Parameter Table

The Category:Infobox templates contains all templates which directly use this template.