Difference between revisions of "Template:Infobox"

From Appropedia
Jump to navigation Jump to search
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
<table class="infobox {{{bodyclass|}}}" style="{{{bodystyle|}}}">{{#if:{{{above|}}}|
+
<div class="infobox {{{bodyclass|}}}" style="{{{bodystyle|}}}">{{#if:{{{form|}}}|
<tr><td colspan="2" class="infobox-above {{{aboveclass|}}}" style="{{{abovestyle|}}}">{{{above}}}</td></tr>}}
+
<div class="infobox-edit">[[File:OOjs UI icon edit-ltr.svg|25px|link=Special:FormEdit/{{{form}}}/{{FULLPAGENAME}}|Edit the infobox]]</div>}}{{#if:{{{above|}}}|
<tr><th colspan="2" class="infobox-title {{{titleclass|}}}" style="{{{titlestyle|}}}">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</th></tr>{{#if:{{{subheader|}}}|
+
<div class="infobox-above {{{aboveclass|}}}" style="{{{abovestyle|}}}">{{{above}}}</div>}}
{{Infobox/row
+
<div class="infobox-title {{{titleclass|}}}" style="{{{titlestyle|}}}">{{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}</div>{{#if:{{{below|}}}|
|data={{{subheader}}}
+
<div class="infobox-below {{{belowclass|}}}" style="{{{belowstyle|}}}">{{{below}}}</div>}}{{#if:{{{image|}}}|
|datastyle={{{subheaderstyle}}}
+
<div class="infobox-image {{{imageclass|}}}" style="{{{imagestyle|}}}">{{#ifexist:Media:{{{image}}}|[[File:{{{image}}}|{{#if:{{{image-size|}}}|{{{image-size}}}|200px}}]]|{{{image}}}}}{{#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}</div>}}
|class={{{subheaderclass|}}}
+
<table class="infobox-table">{{Infobox/row
|rowclass={{{subheaderrowclass}}}
+
  |header={{{header0|}}} |headerstyle={{{headerstyle|}}}
}}}}{{#if:{{{image|}}}|
+
  |label={{{label0|}}}  |labelstyle={{{labelstyle|}}}
{{Infobox/row
+
  |data={{{data0|}}}    |datastyle={{{datastyle|}}}
|data={{#if:{{{image|}}}|{{#ifexist:Media:{{{image}}}|[[File:{{{image}}}|200px]]|{{{image}}}}}}}{{#if:{{{caption|}}}|<div class="infobox-caption">{{{caption}}}</div>}}
+
|class={{{class0|}}}   |rowclass={{{rowclass0|}}}
  |datastyle={{{imagestyle|}}}
+
}}{{Infobox/row
  |class={{{imageclass|}}}
 
  |rowclass={{{imagerowclass|}}}
 
}}}}{{Infobox/row
 
 
  |header={{{header1|}}} |headerstyle={{{headerstyle|}}}
 
  |header={{{header1|}}} |headerstyle={{{headerstyle|}}}
 
  |label={{{label1|}}}  |labelstyle={{{labelstyle|}}}
 
  |label={{{label1|}}}  |labelstyle={{{labelstyle|}}}
Line 508: Line 505:
 
  |data={{{data99|}}}    |datastyle={{{datastyle|}}}
 
  |data={{{data99|}}}    |datastyle={{{datastyle|}}}
 
  |class={{{class99|}}}  |rowclass={{{rowclass99|}}}
 
  |class={{{class99|}}}  |rowclass={{{rowclass99|}}}
}}</table><templatestyles src="Infobox/styles.css" /><includeonly>{{#set:
+
}}</table></div><templatestyles src="Infobox/styles.css" />{{#set:
|Has image = {{{image|}}}
+
|Has title = {{#if:{{{title|}}}|{{{title}}}|{{PAGENAME}}}}
}}</includeonly><noinclude>{{Documentation}}</noinclude>
+
|Has image = {{#ifexist:Media:{{{image|}}}|File:{{{image}}}}}
 +
|Has image caption = {{{caption|}}}
 +
}}{{#if:{{{category|}}}|{{#if:{{NAMESPACE}}||[[Category:{{{category}}}]]}}}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 13:55, 21 October 2020

Infobox

Template documentation[edit]

This template is as a metatemplate: a template used for constructing other templates. It is not meant for use directly in content pages.

Basic usage[edit source]

This is an advanced template. Before using or modifying it, you should be familiar with templates in general. Then look at how it's used on existing infoboxes and follow the examples.

See also[edit source]