Help:Infoboxes

Beta

Infoboxes are like fact sheets, or sidebars in magazine articles, designed to present a summary of the topic of the page. They present important points in an organized and quickly readable format. The sections of an infobox are usually the same from article to article to create consistency across the wikia. Infoboxes are made with templates.

How to use
You can add an infobox through source mode on an article by copying the syntax on the template's documentation page (found at the bottom of the infobox template's page) and pasting it at the top of an article, changing the words after the equals signs to provide the information needed. For example:

Creating new infoboxes


First, create new template, with any name you like, for example Template:ExampleInfobox. Lets start with infobox base, which is title and image.

This wikitext will tell your template to use name and image variables for title and image elements. Additionally you can provide default tag, which value will be used instead when variable is not provided or empty.

Right now we only need fields containing additional information, lets add one.

After adding one last field with source set to first and label to First seen we can invoke template in an article with data to get a working infobox.

And your template ends up like this:

Styling and Display
The infobox is already styled. It is using your wikia's theme. If you change colors in Theme Designer, the infobox will automatically adjust. If any of the variables is empty, it won't be displayed (unless the default tag is invoked).

Layout options
The are two alternative layout options available for infobox:


 * default layout ''(

Grouping information inside the group tags
Next field will let you put a number of fields into group, each of which can be named with header. Remember: fields that are declared but don't have a value won't appear. This rule also applies to group - if none of the fields (excluding header tag) inside any particular group have a value, the whole thing won't show up.

Details

Alternative layout for group tags
Group tag can have alternative horizontal layout where all its content is displayed next to each other in single horizontal line. This can be achievied by adding layout='horizontal" attribute to the group tag.             // ...

Comparing values with comparison tag
And now the hardest of all, comparison tag. It gives you an easy way to compare two forces, especially useful in battle or war infoboxes.

Comparison contains set tags, each of which defines compared values. In header tag you can put name of the compared value. For inside use other fields introduced before, for example data tag. Combatants Details Combatants

Now we just need to invoke it inside article, and the work is done.

Fields formatting
If you want to prepend or append some additional informations to your data, like add some icons, create categories or process the passed values, the fields formatting allows you to do that.

When tag format is specified for node, the variable provided in source= is formatted/modified like specified inside format tags. When variable provided in source= is empty, node renders values provided in default tags or doesn't render if default tags are not specified.

Some of the use cases:

added content $ links: [] categories:

Full syntax:

This effect:

Can be achieved with the following syntax: Price to buy

Available Tags
All infobox fields should be declared using XML convention, with attributes used for field configuration.

Examples

 * Kratos ( source )
 * Beatrix Kiddo ( source )
 * Battle of Arrakeen ( source )