Template:Infobox
Documentation
Example ŋation | |
---|---|
Ruler | Eggs Ample |
Languages | Examplese Examplian |
This is a template for creating (classic) infoboxes. Classic infoboxes are essentially an HTML table with CSS to make it look like an infobox. This template just contains the outer <table>
element, and it takes one unnamed parameter which is the content inside the infobox. The different infobox components themselves require a bit of CSS and other things, so there are templates for those as well. It is mainly intended for creating infobox templates that are in turn used in articles, but it can be used directly as well. An infobox template page might contain text that looks something like this:
{{Infobox| {{Infobox/above|{{{name|}}}}} {{Infobox/row|Ruler|{{{ruler|}}}}} {{Infobox/row|Languages|{{{languages|}}}}} }}
The line breaks are not necessary. The parameters for this template would be name
, ruler
and languages
. The | after the parameter names means that the default value is what comes after the | (i.e. nothing). The helper templates have an if statement that makes it so that they only appear if a non-empty value is provided. This means that if ruler
, for example, is left empty or omitted, that row will not show up.