FANDOM


An explanation of the code of the infobox
Note that linebreaks have been added, sparingly, for readability on this page.
The code An explanation
valign="top"

<onlyinclude><infobox>
<title source="title"><default>Unknown</default></title>
<image source="image"><caption source="imagecaption"/></image>
<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>

{{documentation}}</noinclude>


<onlyinclude>{| class="wikia-infobox"
 
|-
! class="wikia-infobox-header" colspan="2" | {{{title|''Unknown''}}}

 
|-
{{#if: {{{image|}}} |
{{!}} class="wikia-infobox-image" colspan="2" {{!}}
[[File:{{{image}}}|{{{imagewidth|210}}}px|{{{imagecaption|}}}]]
| }}
 
|-
{{#if: {{{imagecaption|}}} |
{{!}} class="wikia-infobox-caption" colspan="2" {{!}} {{{imagecaption}}}
| }}

 
|-
! colspan="2" |
<div class="wikia-infobox-section-header">Some attributes</div>

 
|-
! First
| {{{first|''Unknown''}}}
 
|-
! Second
| {{{second|''Unknown''}}}
 
|-
! Third
| {{{third|''Unknown''}}}

 
|-
! colspan="2" |
<div class="wikia-infobox-section-header">Other attributes</div>

 
|-
{{#if: {{{fourth|}}} |
! Fourth
{{!}} {{{fourth}}}
| }}
 
|-
{{#if: {{{fifth|}}} |
! Fifth
{{!}} {{{fifth}}}
| }}
 
|-
{{#if: {{{sixth|}}} |
! Sixth
{{!}} {{{sixth}}}
| }}

 
|- style="font-size:0; line-height:0;"
! style="width:50%; padding:0" |
! style="width:50%; padding:0" |
 
|}</onlyinclude><noinclude><br style="clear:both;"/>
{{documentation}}</noinclude>

Opens the infobox. Every time you see |-
it means a new row. This line begins with !
which means it's a heading. This heading is
the top of the infobox: if unspecified it says "Unknown".

NOTE: whitespace (linebreaks) don't affect the code.

Here we present the image to be used in the article.
The #if statement checks if the article defined
{{{image}}}. If not, the entire field is omitted.
 
 
 
Here we present the small caption under the image. As above,
all is omitted if {{{imagecaption}}} isn't defined.

 

The first two-column header. It says "Some attributes".
Feel free to change "Some attributes" to your needs!

 
Each of these is a field in the infobox.
By default, they say "First", "Second", "Third".
If undefined, they say "Unknown".
 
You can change the fields. Just change
"First" or "Second", and also change
{{{first and {{{second to whatever fits.
 
You can change the default text from 'Unknown' too.
Remember to change documentation:
| first =


The second two-column header.
Again, feel free to change it, or remove entirely!

 
These are 3 infobox fields, but they're different
from the previous (red) fields. These rows
will be totally hidden, if "fourth", "fifth", etc
are undefined. The red parameters would have displayed
under similar circumstances, only to say "Unknown".
 
 
Decide what kind is more suited to your needs.
If you want to use this format but adapt it,
you will have to change several bits of the code.
 
 
You will have to change the following to meet your needs:
1. {{{sixth|}}} on this line
2. "Sixth" on this line
3. {{{sixth}}} on this line
4. | sixth = in the documentation

 
|} closes the table, thus closing the infobox.
It's best not to mess with this.
 
 
Now the table and infobox is closed.
This last template displays documentation.

Community content is available under CC-BY-SA unless otherwise noted.