Cube Life: Island Survival Wiki
Line 47: Line 47:
 
| location = Curse Headquarters
 
| location = Curse Headquarters
 
| source = [[User:Encredechine{{!}}Encredechine]]
 
| source = [[User:Encredechine{{!}}Encredechine]]
| reward =
+
| reward = Feeling great
 
| related = Fun
 
| related = Fun
| ID =
+
| ID = HYD1
 
}}
 
}}
 
<pre style="width: 450px;">
 
<pre style="width: 450px;">

Revision as of 20:46, 24 July 2018

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   = 
| related  = Fun
| ID       =
}}

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