Difference between revisions of "Template:Infobox species"

From Dwaia Wiki
Jump to navigation Jump to search
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<table class="wikitable infobox">
+
<table class="infobox" style="width:300px">
<tr>
+
 
<th colspan="2" style="font-size:20px">{{{title1|{{PAGENAME}}}}}</th>
+
{{ Infobox default title      | {{{name|{{PAGENAME}}}}} }}
</tr>{{#if:{{{image1|}}}|<tr>
+
 
<td colspan="2" style="font-size:20px">[[File:{{{image1}}|frameless]]</td>
+
{{ Infobox conditional image  | {{{image|}}}           }}
</tr>|}}{{#if:{{{caption1|}}}|<tr>
+
{{ Infobox conditional caption | {{{caption|}}}         }}
<td colspan="2" class="caption">{{{caption1}}}</td>
+
 
</tr>|}}{{#if:{{{element|}}}{{{level|}}}{{{skills|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}}|<tr>
+
{{ Infobox conditional section
<th colspan="2" style="font-size:16px">Stats</td>
+
| cond = {{{element|}}}{{{level|}}}{{{skills|}}}{{{str|}}}{{{dex|}}}{{{con|}}}{{{int|}}}{{{wis|}}}{{{cha|}}} <!-- This checks if any of the stats are defined by concatenating them and seeing if the string is empty -->
</tr><tr>
+
| title = Stats
<td>Element</td><td>{{{element|-}}}</td>
+
|
</tr><tr>
+
{{ Infobox conditional data    | Elements | {{{element|}}} }}
<td>Level</td><td>{{{level|-}}}</td>
+
{{ Infobox conditional data    | Level   | {{{level|}}}   }}
</tr><tr>
+
{{ Infobox conditional data    | Skills   | {{{skills|}}} }}
<td>Skills</td><td>{{{skills|-}}}</td>
+
{{ Infobox conditional data    | STR     | {{{str|}}}     }}
</tr><tr>
+
{{ Infobox conditional data    | DEX     | {{{dex|}}}     }}
<td>STR</td><td>{{{str|-}}}</td>
+
{{ Infobox conditional data    | CON     | {{{con|}}}     }}
</tr><tr>
+
{{ Infobox conditional data    | INT     | {{{int|}}}     }}
<td>DEX</td><td>{{{dex|-}}}</td>
+
{{ Infobox conditional data    | WIS     | {{{wis|}}}     }}
</tr><tr>
+
{{ Infobox conditional data    | CHA     | {{{cha|}}}     }}
<td>CON</td><td>{{{con|-}}}</td>
+
{{ Infobox conditional caption | [[Stats Explained|What are these stats?]] }}
</tr><tr>
+
}}
<td>INT</td><td>{{{int|-}}}</td>
+
 
</tr><tr>
+
{{ Infobox conditional section
<td>WIS</td><td>{{{wis|-}}}</td>
+
| cond = {{{general_body_type|}}}{{{prominent_features|}}}{{{height|}}}{{{weight|}}}
</tr><tr>
+
| title = Appearance
<td>CHA</td><td>{{{cha|-}}}</td>
+
|
</tr><tr>
+
{{ Infobox conditional data    | General Body Type | {{{general_body_type|}}} }}
<td class="caption">[[Stats Explained|What are these stats?]]</td>
+
{{ Infobox conditional data    | Prominent Features | {{{prominent_features|}}} }}
</tr>|}}<tr>
+
{{ Infobox conditional data    | Height            | {{{height|}}}             }}
{{#if:{{{general_body_type|}}}{{{prominent_features|}}}{{{height|}}}{{{weight|}}}|
+
{{ Infobox conditional data    | Weight            | {{{weight|}}}             }}
<th colspan="2" style="font-size:16px">Appearance</td>
+
}}
</tr>{{#if:{{{general_body_type|}}}|<tr>
+
 
<td>General Body Type</td><td>{{{general_body_type}}}</td>
+
{{ Infobox conditional section
</tr>|}}{{#if:{{{prominent_features|}}}|<tr>
+
| cond = {{{territory|}}}{{{preferred_habitat|}}}
<td>Prominent Features</td><td>{{{prominent_features}}}</td>
+
| title = Environment
</tr>|}}{{#if:{{{height|}}}|<tr>
+
|
<td>Height</td><td>{{{height}}}</td>
+
{{ Infobox conditional data    | Territory        | {{{territory|}}}         }}
</tr>|}}{{#if:{{{weight|}}}|<tr>
+
{{ Infobox conditional data    | Preferred Habitat | {{{preferred_habitat|}}} }}
<td>Weight</td><td>{{{weight}}}</td>
+
}}
</tr>|}}|}}
+
 
{{#if:{{{territory|}}}{{{preferred_habitat|}}}|<tr>
 
<th colspan="2" style="font-size:16px">Environment</td>
 
</tr>{{#if:{{{territory|}}}|<tr>
 
<td>Territory</td><td>{{{territory}}}</td>
 
</tr>|}}{{#if:{{{preferred_habitat|}}}|<tr>
 
<td>Preferred Habitat</td><td>{{{preferred_habitat}}}</td>
 
</tr>|}}|}}
 
 
</table>
 
</table>
  
Line 72: Line 65:
 
}}
 
}}
 
</pre>
 
</pre>
 +
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 20:16, 10 March 2019

Infobox species


Example usage:

{{Infobox species
|title1=Example
|image1=Example
|caption1=Example
|element=Example
|level=Example
|skills=Example
|str=Example
|con=Example
|dex=Example
|int=Example
|cha=Example
|wis=Example
|general_body_type=Example
|prominent_features=Example
|height=Example
|weight=Example
|territory=Example
|preferred_habitat=Example
}}