Infoboxes
Infoboxes are visual elements, typically in the upper-right-hand corner of wiki pages, that contain useful at-a-glance information about an article's subject. If this page seems confusing and you aren't sure what type of infobox to use, please use DRUID infoboxes.
Example infoboxes
Infoboxes can be styled in a variety of ways and can contain many different types of information.
How to define an infobox
Infoboxes are defined inside of templates. There are three main ways you can define an infobox inside of a template on wiki.gg. We recommend that most new (non-fork) wikis use DRUID infoboxes, as this option tends to be the easiest to understand and customize.
DRUID infoboxes (recommended option)
DRUID infoboxes give you an extensible framework in which you can define your own infoboxes. They are implemented in Lua, but you will not need to write any Lua code to use them.
If your wiki was populated with the default loadout wiki in October 2024 or later, you should have a page called Template:Example character infobox shown in use at the page Example character .[note 1] This example can help you start using DRUID infoboxes for the first time, and there are more example templates here on the support wiki (see DRUID infoboxes#Examples).
If your wiki does not have the default loadout wiki templates, please see DRUID infoboxes for installation instructions or ask a wiki.gg staff member for help.
Portable Infoboxes
Portable Infoboxes (PIs) rely on the Portable Infobox extension to enable the creation of XML-based infoboxes. If your wiki is a fork, or if you are adapting code from an existing wiki (e.g., a mod using the same infobox templates as the main game), you might already be using Portable Infoboxes, in which case you can keep using them. However, most editors tend to find DRUID easier to use than PIs, and we recommend trying that approach first.
Please note also that wiki.gg staff cannot guarantee significant assistance with making or customizing Portable Infoboxes. We provide significantly more support for DRUID and recommend using DRUID in nearly all cases.
DIY infoboxes
Infoboxes are nothing more than a table and accompanying styles, so you can also define your own infoboxes without relying on either of the above. This is not really recommended for most new wikis, but some large wikis with very extensive and bespoke requirements for their infoboxes might prefer this path.
Here is how a small snippet of a DIY infobox might look:
{{#if:{{{atk_spd|}}}|<!-- --><tr class="infobox-row"><!-- --><th class="infobox-label">Attack speed:</th><!-- --><td class="infobox-data">{{{atk_spd}}}%</td><!-- --></tr><!-- end if -->}}
This snippet checks if a parameter called atk_spd
is defined by the user filling out the infobox; if so it prints a table row with a header cell saying "Attack speed:" followed by a content cell saying "X%" where X is the value specified by atk_spd
. You can then customize the display in CSS via .infobox-row
, .infobox-label
, and .infobox-data
.
Please note that wiki.gg staff will generally not provide assistance with DIY infoboxes like these; in nearly all cases, it will be easier to convert entirely to DRUID and then provide help within the DRUID framework.
Additional infobox data
In addition to displaying the infobox, infobox templates often do a couple other things at the same time:
- Add some categories to the page (for example,
Template:Infobox item
might addCategory:Items
to every single page it's used on) - Store Cargo
Notes
- ↑ From August to October 2024, these pages were titled Template:Example Character Infobox and Example Character on DLW.