Cube Life: Island Survival Wiki
Advertisement
Template-info.png Documentation

This is just a generic infobox with a few sample fields

Template structure

  • Fields are defined using triple curly brackets, like this: {{{fieldname}}}
{| class="infoboxtable" <!-- this class declaration tells the wiki this table is an infobox, and is based on css found in [[Mediawiki:Hydra.css]] -->
|-
! colspan="2" class="infoboxname" <!-- this class declaration tells the wiki this this row has special formatting --> |  "{{{name}}}" <!-- this tells the wiki to insert the contents of a field called "name" here -->
|-
{{#if: {{{image|}}} | ! colspan="2" {{!}} [[File:{{{image}}}|250x250px]] | <includeonly>[[Category:Infoboxes lacking images]]</includeonly>}} <!-- this row uses logic. It asks whether or not a field called "image" was specified, and if it was, then it places the content of the field in an image call. If there is no image specified, then it adds the page to a category called "Infoboxes lacking images" ->
|-
! colspan="2" class="infoboxdetails" <!-- this class declaration tells the wiki this this row has special formatting --> | Details 
|-
{{#if: {{{race|}}} | {{!}} width=80 {{!}} <div>Race</div> {{!!}} {{{race}}} }} <!-- this row is one of the main data rows in the infobox -->
|-
{{#if: {{{location|}}} | {{!}} <div>Location(s)</div> {{!!}} {{{location}}} }}
|-
{{#if: {{{source|}}} | {{!}} <div>Source</div> {{!!}} {{{source}}} }}
|-
{{#if: {{{reward|}}} | {{!}} <div>Reward</div> {{!!}} {{{reward}}} }}
|-
{{#if: {{{related|}}} | {{!}} <div>Related</div> {{!!}} {{{related}}} }}
|-
{{#if: {{{ID|}}} | {{!}} <div>ID</div> {{!!}} {{{ID}}} }}
|}

Usage

{{Infobox_example
| name     = 
| image    = 
| race     = 
| location = 
| source   = 
| reward   = 
| related  = 
| ID       =
}}

Example

Template:Infobox example

{{Infobox_example
| name     = Hydra guy
| image    = Curse hydra.png
| race     = Plushie
| location = Curse Headquarters
| source   = [[User:Encredechine{{!}}Encredechine]]
| reward   = Feeling great
| related  = Fun
| ID       = HYD1
}}

This is the documentation page, it should be transcluded into the main template page. See Template:Doc for more information.