Template:Infobox/doc: Difference between revisions

From Vintage Story Wiki
m
no edit summary
mNo edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template serves as the base for any infobox templates, providing a customizable layout to build off of. Each infobox can currently contain up to 10 lines of information.  
{{Lua|Infobox}}
This template serves as the base for any infobox templates, providing a customizable layout to build off of. Each row is created using [[Template:Infobox row]].


== Usage ==
== Usage ==
While the parameters up to only group2 are listed here, it is possible to have up to 10 different groups <code>group1-10</code>. The content of <code>bodyN</code> can contain a child navbox which has <code>child=true</code>, allowing for up to 10 subgroups per group.
<pre style="display: table">
<pre style="display: table">
{{Infobox
{{Infobox
Line 10: Line 9:
|image = An image to display beneath the title
|image = An image to display beneath the title
|align = Whether or not to align this infobox to the left
|align = Whether or not to align this infobox to the left
|group1 = First line title
|rows = Rows of content, use {{Infobox row}}
|body1 = First line body content
|group2 = Second line title
|body2 = Second line body content
|groupN = N line title
|bodyN = N line body content
|titlestyle = Optional title bar CSS
|titlestyle = Optional title bar CSS
|css = Optional main infobox CSS
|css = Optional main infobox CSS
Line 32: Line 26:
| align || Override to align this infobox differently || CSS || no
| align || Override to align this infobox differently || CSS || no
|-
|-
| group1 || The title for the first group || Content || suggested
| rows || Rows of content || Content || yes
|-
| body1 || The content to feature in the first groups' body || Content || suggested
|-
| group2 || The title for the second group || Content || no
|-
| body2 || The content to feature in the second groups' body || Content || no
|-
| groupN || The title for the N group || Content || no
|-
| bodyN || The content to feature in the N groups' body || Content || no
|-
|-
| titlestyle || Optional CSS to be added to the title bar's style || CSS || no
| titlestyle || Optional CSS to be added to the title bar's style || CSS || no
Line 56: Line 40:
| style="width: 30%"|<pre>{{Infobox
| style="width: 30%"|<pre>{{Infobox
|title = Infobox
|title = Infobox
|subtitle = Subtitle
|image = Move_arrows
|image = File:move_arrow.png
|rows = {{Infobox row | Label | Field}}
|group1 = Line 1
|body1 = Line 1 content
|group2 = Line 2
|body2 = Line 2 content
|group3 = Line 3
|body3 = Line 3 content
}}</pre>
}}</pre>
||
||
{{Infobox
{{Infobox
|title = Infobox
|title = Infobox
|subtitle = Subtitle
|image = Move_arrows
|image = Move_arrows.png
|rows = {{Infobox row | Label | Field}}
|group1 = Line 1
|body1 = Line 1 content
|group2 = Line 2
|body2 = Line 2 content
|group3 = Line 3
|body3 = Line 3 content
}}
}}
|}
|}
<includeonly>[[Category:Infobox templates]]</includeonly>
<includeonly>[[Category:Infobox templates]]</includeonly>
Confirmedusers, Interface administrators
1,131

edits