Template:Infobox/doc
Jump to navigation
Jump to search
Description[edit source]
This template is a sample infobox, to aid in the creation of new infoboxes.
Recommended usage: copy the template code to a new template page, and edit it there.
Infobox and template background[edit source]
See Help:Templates, Help:Infobox and Help:Tables for some background on how templates and infoboxes work.
Building blocks[edit source]
The infobox is made of the following basic building blocks:
- Overall table class:
class="wikia-infobox"
- Table heading cell class:
class="wikia-infobox-header"
- Use row header marks ("
!
") for row title cells (and "|
" for normal cells) - Section separator line: give the header below it a wrapping
div
withclass="wikia-infobox-section-header"
- Image cell class:
class="wikia-infobox-image"
- Image caption cell class:
class="wikia-infobox-caption"
Other notes[edit source]
- The Title, First, Second, and Third rows show "Unknown" if their values are not specified.
- The Image, Imagecaption, Fourth, Fifth, and Sixth rows won't show up if their values are not specified: they are each completely enclosed in an 'if' statement.
Syntax[edit source]
{{infobox | title = | image = [e.g. "Example.jpg"] | imagewidth = [e.g. "150"] [default: 210 pixels] | imagecaption = | first = | second = | third = | fourth = | fifth = | sixth = }}
Samples[edit source]
{{infobox | title = A pretty flower | image = Example.jpg | imagewidth = 100 | imagecaption = Floweris flowerum | first = Pink and green | second = Outdoors | fourth = Annual }}
Results in...
A pretty flower | |
---|---|
Floweris flowerum | |
Some attributes
| |
First | Pink and green |
Second | Outdoors |
Third | Unknown |
Other attributes
| |
Fourth | Annual |