Template:Infobox/doc: Difference between revisions

From Vintage Story Wiki
(Created page with "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....")
(No difference)

Revision as of 16:44, 13 August 2022

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.

Usage

While the parameters up to only group2 are listed here, it is possible to have up to 10 different groups group1-10. The content of bodyN can contain a child navbox which has child=true, allowing for up to 10 subgroups per group.

{{Infobox
|title = Infobox title
|subtitle = Optional subtitle
|image = An image to display beneath the title
|left = Whether or not to align this infobox to the left
|group1 = First line title
|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
|css = Optional main infobox CSS
}}
Parameter Description Type Required
title The title shown at the top of the infobox String yes
subtitle A smaller subtitle shown below the title box String no
image An image to be displayed beneath the title bar File no
left Whether or not to align this infobox to the left instead of the right Boolean no
group1 The title for the first group Content suggested
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
css Optional CSS to be applied to the entire infobox's style CSS no

Example

Code Result
{{Infobox
|title = Infobox
|subtitle = Subtitle
|image = File:move_arrow.png
|group1 = Line 1
|body1 = Line 1 content
|group2 = Line 2
|body2 = Line 2 content
|group3 = Line 3
|body3 = Line 3 content
}}

Lua error in Module:Infobox at line 49: invalid value (nil) at index 6 in table for 'concat'.