Vorlage:Infobox

Aus Fortnite Wiki
Wechseln zu: Navigation, Suche
Template-info.png Dokumentation

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

Usage[Quelltext bearbeiten]

{{Infobox
| mini = true/false /optional
| name =
| rarity =
| label1 = 
| data1 = 
| mode1 = /optional
| label2 = 
| data2 = 
| mode2 = /optional
...
| label# = 
| data# = 
| mode# = /optional
}}

Parameters[Quelltext bearbeiten]

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.

|mini=[Quelltext bearbeiten]

This parameter indicates whether to generate full-size infoboxes or mini infoboxes like those used on Battle Royale Weapons. Setting mini to true will make mini infoboxes, any other value (including leaving the parameter blank) will default to making full-size infoboxes.

|name=[Quelltext bearbeiten]

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.

|rarity=[Quelltext bearbeiten]

This is the border color of the infobox. Acceptable values are the same as those for {{rarity}}. Defaults to white if not specified.

|label#=[Quelltext bearbeiten]

This is the "title" of the field/value set. This is REQUIRED for ALL desired field/value sets, even for modes where it does not appear on the page (see mode below for more information).

|data#=[Quelltext bearbeiten]

This is the "contents" of the field/value set.

|mode#=[Quelltext bearbeiten]

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 is identical to mode#=link except it works for data# parameters that contain comma-separated lists. It will generate links for each value in the list.
block
This generates a title/contents set ideal for long blocks of text. The label# parameter is in a header cell above, and the data# parameter is in a content cell with a smaller font size below.
section
This only generates a title, similar to the header generated by mode#=block. The data# parameter is used as the contents of the header cell, and the label# cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks).
image
This generates a single cell that contains an image. The file name should be put into the data# parameter (do not include File:), and the label# cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks).
By default, the image will be size 256px for full-size infoboxes and 80px for mini infoboxes, but this can be changed with the optional |size#= parameter using one of the following formats: WIDTHpx, xHEIGHTpx, or WIDTHxHEIGHTpx
custom
This generates a single cell that contains anything you want, including wikitext and/or HTML. It has no predefined formatting. The data# parameter is the contents of the cell, and the label# cell is not displayed and therefore can be anything you want other than whitespace (e.g. spaces and linebreaks).

Examples[Quelltext bearbeiten]

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

Full-Size Infobox Example[Quelltext bearbeiten]

{{Infobox
|name=Infobox Title
|rarity=Rare

|label1=Image
|data1=Schematic.png
|mode1=image
|size1=120x120px

|label2=Block
|data2=Block text contents
|mode2=block

|label3=Default
|data3=Default text content
|mode3=

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

|label5=Linklist
|data5=Soldier,Ninja,Outlander,Constructor
|mode5=linklist

|label6=Section
|data6=Section text content
|mode6=section

|label7=Custom
|data7=Custom text content
|mode7=custom
}}
Image Schematic.png
Block Block text contents
Default Default text content
Link Heroes
Linklist Soldier, Ninja, Outlander, Constructor
Section Section text content
Custom Custom text content

Mini Infobox Example[Quelltext bearbeiten]

{{Infobox
|mini=true
|name=Infobox Title
|rarity=Rare

|label1=Image
|data1=Schematic.png
|mode1=image

|label2=Block
|data2=Block text contents
|mode2=block

|label3=Default
|data3=Default text content
|mode3=

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

|label5=Linklist
|data5=Soldier,Ninja,Outlander,Constructor
|mode5=linklist

|label6=Section
|data6=Section text content
|mode6=section

|label7=Custom
|data7=Custom text content
|mode7=custom
}}
Image Schematic.png
Block Block text contents
Default Default text content
Link Heroes
Linklist Soldier, Ninja, Outlander, Constructor
Section Section text content
Custom Custom text content

Tips[Quelltext bearbeiten]

  • By default, label/data sets will be hidden if data# 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.