Template:Infobox/doc: Difference between revisions

Updated the doc for the new wikipedia infobox code
(Created page with "{{Doc/start}} An infobox for use on pages. This is just an basic infobox ==Usage== <pre> {{Infobox | title = | image = | param1 = | param2 = | param3 = | param4 = | param5 = }} </pre> ===Parameters=== {| class="wikitable" ! Parameter !! Data Type !! Default Value !! Description |- | name || String || <nowiki>{{PAGENAME}}</nowiki> || The title |- | image || String || <nowiki>{{{name}}}.png or {{PAGENAME}}.png</nowiki> || The image to be used, without the File: p...")
 
(Updated the doc for the new wikipedia infobox code)
Line 2: Line 2:
An infobox for use on pages. This is just an basic infobox
An infobox for use on pages. This is just an basic infobox


==Usage==
== Usage ==
<pre>
=== Parameters ===
{{Infobox
There are some general 'styling' parameters, some 'title' and subtitle parameters, some 'image' parameters', and then parameters for each of the 80 possible 'rows'
| title =  
==== Style ====
| image =  
* bodyclass
| param1 =  
* bodystyle
| param2 =  
 
| param3 =
==== Title ====
| param4 =
* title
| param5 =
* titleclass
}}
* titlestyle
</pre>
* above
* aboveclass
* abovestyle
* subheader
* subheaderclass
* subheaderstyle
 
==== Image ====
* image
* imageclass
* imagestyle
* caption
* captionstyle


===Parameters===
==== Rows ====
{| class="wikitable"
===== For all rows =====
! Parameter !! Data Type !! Default Value !! Description
* headerstyle
|-
* labelstyle
| name || String || <nowiki>{{PAGENAME}}</nowiki> || The title
* datastyle
|-
| image || String || <nowiki>{{{name}}}.png or {{PAGENAME}}.png</nowiki> || The image to be used, without the File: prefix but with the extension.
|-
| param1 || String ||  || Optional parameter
|-
| param2 || String ||  || Optional parameter
|-
| param3 || String ||  || Optional parameter
|-
| param4 || String || || Optional parameter
|-
| param5 || String || || Optional parameter
|}


==Example==
===== For specific rows =====
{{Infobox
For each of the 80 possible rows, replace the 'N' below with the number (e.g. 'header3', 'header80')
| title = Thor
* headerN
| image =  
* labelN
| param1 = something
* dataN
| param2 =
* classN
| param3 =
| param4 =
| param5 =
}}


<pre style="overflow:auto;">
== Example ==
{{Infobox  
{| class="wikitable" width="100%"
| title = Thor
! Code
| image =  
! Output
| param1 = something
|-
| param2 =  
| <pre>
| param3 =  
{{Infobox|title=TITLE
| param4 =  
|above=ABOVE
| param5 =  
|subheader=SUBHEADER
|image=[[Image:thor.png|192px]]
|caption=IMAGE_CAPTION
|header1=HEADER_1
|label1=LABEL_1
|data1=DATA_1
}}
}}
</pre>
</pre>
| {{Infobox|title=TITLE
|above=ABOVE
|subheader=SUBHEADER
|image=[[Image:thor.png|192px]]
|caption=IMAGE_CAPTION
|header1=HEADER_1
|label1=LABEL_1
|data1=DATA_1
}}
|}


{{Doc/end}}
{{Doc/end}}