Contents

This template is intended as a meta-template, that is, a template that's used when constructing other templates. It's not meant for use directly in an article. See wikipedia:Help:Infobox for information on how to craft infoboxes in general.

Each row on the table can either be a "header", or it can have a label/data pair, or it can just be a data cell. These are mutually exclusive states so if you define a row to be both a header and a label/data pair, the label/data pair is overridden.

Note that if you want to insert an image elsewhere other than the top of the infobox, or insert other "freeform" data, using a row with just a "data" field allows for that sort of thing.

A row with a label but no data is not displayed. This allows for optional infobox contents. To make a field optional, use a parameter that defaults to an empty string, like so:

| data5 = {{{population|}}}

For more complex fields with pre-formated contents that would still be present if a parameter was unset, you can wrap it all in a simple "if" statement to make the whole thing vanish when not used. Example:

| data5 = {{#if: {{{mass|}}} | {{{mass}}} kg}}

You can make headers optional in a similar way. If you want a header to appear only if one or more of the data fields that fall under it are filled, one could use the following pattern as an example of how to do it:

The trick to this is that the "if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item_one, item_two and item_three are undefined will the if statement fail.