Template:Infobox/doc: Difference between revisions

From Pirate Software Wiki
(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}}

Revision as of 22:18, 27 November 2023

Documentation

An infobox for use on pages. This is just an basic infobox

Usage

Parameters

There are some general 'styling' parameters, some 'title' and subtitle parameters, some 'image' parameters', and then parameters for each of the 80 possible 'rows'

Style

  • bodyclass
  • bodystyle

Title

  • title
  • titleclass
  • titlestyle
  • above
  • aboveclass
  • abovestyle
  • subheader
  • subheaderclass
  • subheaderstyle

Image

  • image
  • imageclass
  • imagestyle
  • caption
  • captionstyle

Rows

For all rows
  • headerstyle
  • labelstyle
  • datastyle
For specific rows

For each of the 80 possible rows, replace the 'N' below with the number (e.g. 'header3', 'header80')

  • headerN
  • labelN
  • dataN
  • classN

Example

Code Output
{{Infobox|title=TITLE
|above=ABOVE
|subheader=SUBHEADER
|image=[[Image:thor.png|192px]]
|caption=IMAGE_CAPTION
|header1=HEADER_1
|label1=LABEL_1
|data1=DATA_1
}}
Infobox/doc
[[File:|314x300px]]
Infos