Template:Infobox

From Fortnite Wiki
Jump to: navigation, search

Documentation[purge]

This template will generate infoboxes when given sets of field and value parameters.

Usage

Full size infoboxes Mini infoboxes
{{Infobox
| title =
| image = 

| header1 =

| label2 = 
| data2 = 
| mode3 = /optional

| label4 = 
| data4 = 
| mode4 = /optional
...
| header# =

| label# = 
| data# = 
| mode# = /optional
}}
{{Minibox
| title =
| image = 

| header1 =

| label2 = 
| data2 = 
| mode3 = /optional

| label4 = 
| data4 = 
| mode4 = /optional
...
| header# =

| label# = 
| data# = 
| mode# = /optional
}}

Note that the ONLY DIFFERENCE between full size and mini infoboxes is the use of {{minibox}} instead of {{infobox}}. All parameter use is identical.

Parameters

As this template dynamically generates an infobox based on the number of fields supplied, # in each section below stands for the number of each field/value set. Start your field/value sets at label1 and data1, and increase the number by 1 for each new set.

|title=

This is the title of the infobox. It is required, though {{PAGENAME}} can be used if you want it to default to the full name of the page the template is used on.

|image#=

This is the main image(s) of the infobox. Please include the full image code, as in [[File:<filename>|256px]]. This can be used multiple times, or you may simply use image if it is only used once.

|caption#
This is the caption for the corresponding image.

|header#=

This is a standalone header row within the infobox.

|label#=

This is the "title" of the field/value set. This is OPTIONAL.

|data#=

This is the "contents" of the field/value set. If a label# is not specified, it will span the whole row.

|mode#=

This parameter indicates how the set should be displayed. Acceptable values are as follows:

default (mode parameter blank):
This generates a standard title/contents set, with the label# parameter in a header cell to the left and the data# parameter in a content cell to the right.
link
This generates a standard title/contents set like the default, except the data# parameter is displayed as a link.
linklist
This generates a standard title/contents set like the default, except the data# parameter is displayed as a list of links separated by commas. This is useful for comma separated lists of pages that should be linked individually.

Styling Parameters

This template also allows for optional styling parameters that may be used to style generated rows. If you are not sure why you might need these, you probably do not need to use them.

|titleclass=

This is an optional CSS class for the title element.

|imageclass#=

This is an optional CSS class for a corresponding image element.

|headerclass#=

This is an optional CSS class for a corresponding header element.

|rowclass#=

This is an optional CSS class for a whole row containing a corresponding label/data pair.

|class#=

This is an optional CSS class for a corresponding data element only. It does not apply to the label element, for that see rowclass above.

Examples

For a list of examples in active use, see Help:Infoboxes.

Full-Size Infobox Example

{{Infobox
|title=Infobox Title
|image=[[File:Schematic.png|256px]]

|header1=Header text

|label2=Label
|data2=Data

|data3=Full width data

|label4=Link mode
|data4=Heroes
|mode4=link

|label5=Linklist mode
|data5=Soldier,Ninja,Outlander,Constructor
|mode5=linklist
}}
Infobox Title
Schematic.png
Header text
Label Data
Full width data
Link mode Heroes
Linklist mode Soldier, Ninja, Outlander, Constructor

Mini Infobox Example

{{Minibox
|title=Minibox Title
|image=[[File:Schematic.png|128px]]

|header1=Header text

|label2=Label
|data2=Data

|data3=Full width data

|label4=Link mode
|data4=Heroes
|mode4=link

|label5=Linklist mode
|data5=Soldier,Ninja,Outlander,Constructor
|mode5=linklist
}}
Minibox Title
Schematic.png
Header text
Label Data
Full width data
Link mode Heroes
Linklist mode Soldier, Ninja, Outlander, Constructor

Tips

  • By default, label/data sets will be hidden if data# is empty, and header rows will be hidden if header# is empty.
    • As a result, sets that have plain text data# contents (e.g. a % sign after an optional “percent” parameter, or a section-mode set that contains plain text rather than a parameter) will cause the set to ALWAYS show up, even if the parameter defining it (or parameters below the section row) are empty. This can be avoided by enclosing all plain text contents in #if statements. This allows those cells to be selectively shown or hidden based on the values of other parameters. See the Parser Functions documentation for more information on #if statements.
  • To add rarity color coding to an infobox, add {{parseRarity|{{{rarity|}}}}} before the infobox.

See also

About