Template:Infobox/doc: Difference between revisions

no edit summary
m (1 revision imported)
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1:
GMC Infobox documentation (Based on IPoly's Infobox)
==Description==
__NOTOC__
This template is a sample infobox, to aid in the creation of new infoboxes.
Use the infobox by inserting the following to your page:
 
<div class="toccolours mw-collapsible mw-collapsed">
Recommended usage: copy the template code to a new template page, and edit it there.
Syntax
 
<div class="mw-collapsible-content"><pre>
===Infobox and template background===
See [[Help:Templates]], [[Help:Infobox]] and [[Help:Tables]] for some background on how templates and infoboxes work.
 
===Building blocks===
The infobox is made of the following basic building blocks:
 
* Overall table class: <code>class="wikia-infobox"</code>
* Table heading cell class: <code>class="wikia-infobox-header"</code>
* Use row header marks ("<code>!</code>") for row title cells ''(and "<code>|</code>" for normal cells)''
* Section separator line: give the header below it a wrapping <code>div</code> with <code>class="wikia-infobox-section-header"</code>
* Image cell class: <code>class="wikia-infobox-image"</code>
* Image caption cell class: <code>class="wikia-infobox-caption"</code>
 
===Other 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: they are each completely enclosed in an 'if' statement.
 
==Syntax==
<pre>
{{infobox
| titleBackColor = [HEX or RGB = Color]
| BoxTitle = ''[Page Title]''
| image = [e.g. "Example.jpg"]
| image = File:[Image]
| imagewidth = [e.g. "150"] [default: 210 pixels]
| imagecaption imagewidth = 250px
| caption = [Caption]
| first =
| secondRow1Title = [Row 1 =Title]
| Row1Info = [Info]
| third =
| fourthRow2Title = [Row 2 =Title]
| Row2Info = [Info]
| fifth =
| sixthRow3Title = [Row 3 =Title]
| Row3Info = [Info]
| Row4Title = [Row 4 Title]
| Row4Info = [Info]
| Row5Title = [Row 5 Title]
| Row5Info = [Info]
| Row6Title = [Row 6 Title]
| Row6Info = [Info]
| Row7Title = [Row 7 Title]
| Row7Info = [Info]
| Row8Title = [Row 8 Title]
| Row8Info = [Info]
| Row9Title = [Row 9 Title]
| Row9Info = [Info]
| Row10Title = [Row 10 Title]
| Row10Info = [Info]
}}
</pre></div>
</div>
 
==SamplesNotes==
* Not putting any value for "BackColor" would make your infobox use the default color.
* "imagewidth" should be kept at 250px.
* Up to ten rows only.
 
==Example==
<pre>
{{infobox
| BackColor =
| title = A pretty flower
| BoxTitle = ''Nylius Avidius''
| image = Example.jpg
| image = File:Nyl2020.jpg
| imagewidth = 100
| imagewidth = 250px
| imagecaption = Floweris flowerum
| caption = Nyl wearing the Aurean Republic officer uniform, 2020
| first = Pink and green
| Row1Title = Aliases
| second = Outdoors
| Row1Info = Mevarus, Gabrien, Orbitus
| fourth = Annual
| Row2Title = Militaries/orgs founded
| Row2Info = Marseille, Rothstein Corp., Republic (towering), Foundry, etc.
| Row3Title = Join date
| Row3Info = 2013
| Row4Title = Current affiliations
| Row4Info = [[Aurea]], [[Graal Historical Society]], [[Graal Military Wiki|The Wiki Project]], The Royal Institute
}}
</pre>
 
Results in...
 
{{infobox
| BackColor =
| title = A pretty flower
| BoxTitle = ''Nylius Avidius''
| image = Example.jpg
| image = File:Nyl2020.jpg
| imagewidth = 100
| imagewidth = 250px
| imagecaption = Floweris flowerum
| caption = Nyl wearing the Aurean Republic officer uniform, 2020
| first = Pink and green
| Row1Title = Aliases
| second = Outdoors
| Row1Info = Mevarus, Gabrien, Orbitus
| fourth = Annual
| Row2Title = Militaries/orgs founded
| Row2Info = Marseille, Rothstein Corp., Republic (towering), Foundry, etc.
| Row3Title = Join date
| Row3Info = 2013
| Row4Title = Current affiliations
| Row4Info = [[Aurea]], [[Graal Historical Society]], [[Graal Military Wiki|The Wiki Project]], The Royal Institute
}}
 
<includeonly>[[Category:General wiki templates|{{PAGENAME}}]][[Category:Infobox templates| ]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
462

edits