Difference between revisions of "Template:Infobox"
Eaglefrost (talk | contribs) |
Eaglefrost (talk | contribs) |
||
Line 1: | Line 1: | ||
− | + | <onlyinclude><infobox> | |
− | {{documentation}} | + | <title source="title"><default>''Unknown''</default></title> |
− | + | <image source="image"><caption source="imagecaption"/></image> | |
− | </noinclude> | + | <group> |
+ | <header>Some attributes</header> | ||
+ | <data source="first"><label>First</label><default>''Unknown''</default></data> | ||
+ | <data source="second"><label>Second</label><default>''Unknown''</default></data> | ||
+ | <data source="third"><label>Third</label><default>''Unknown''</default></data> | ||
+ | </group> | ||
+ | <group> | ||
+ | <header>Other attributes</header> | ||
+ | <data source="fourth"><label>Fourth</label></data> | ||
+ | <data source="fifth"><label>Fifth</label></data> | ||
+ | <data source="sixth"><label>Sixth</label></data> | ||
+ | </group> | ||
+ | <group layout="horizontal"> | ||
+ | <header>Order</header> | ||
+ | <data source="previous"><label>Previous</label></data> | ||
+ | <data source="next"><label>Next</label></data> | ||
+ | </group> | ||
+ | </infobox></onlyinclude><noinclude><br style="clear:both;"/> | ||
+ | {{documentation}}</noinclude> |
Revision as of 19:25, 5 January 2020
<infobox>
<title source="title"><default>Unknown</default></title>
<image source="image"></image>
<group>
<header>Some attributes</header>
<label>First</label><default>Unknown</default>
<label>Second</label><default>Unknown</default>
<label>Third</label><default>Unknown</default>
</group>
<group>
<header>Other attributes</header>
<label>Fourth</label>
<label>Fifth</label>
<label>Sixth</label>
</group>
<group layout="horizontal">
<header>Order</header>
<label>Previous</label>
<label>Next</label>
</group>
</infobox>
Description
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
See Help:Templates, Help:Infobox for some background on how templates and infoboxes work.
Notes
- 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.
Syntax
{{infobox | title = | image = [e.g. "Example.jpg"] | imagecaption = | first = | second = | third = | fourth = | fifth = | sixth = | previous = | next = }}
Samples
{{infobox | title = A pretty flower | image = Example.jpg | imagecaption = Floweris flowerum | first = Pink and green | second = Outdoors | fourth = Annual | previous = I | next = III }}
Results in...
<infobox> <title source="title"><default>Unknown</default></title> <image source="image"></image> <group> <header>Some attributes</header> <label>First</label><default>Unknown</default> <label>Second</label><default>Unknown</default> <label>Third</label><default>Unknown</default> </group> <group> <header>Other attributes</header> <label>Fourth</label> <label>Fifth</label> <label>Sixth</label> </group> <group layout="horizontal"> <header>Order</header> <label>Previous</label> <label>Next</label> </group> </infobox>
The above documentation is transcluded from Template:Infobox/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |