Difference between revisions of "Template:Infobox species"

From Dwaia Wiki
Jump to navigation Jump to search
(Created page with "<infobox> <title source="title1"> <default>{{PAGENAME}}</default> </title> <image source="image1"> <caption source="caption1"/> </image> <group collapse="ope...")
 
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<infobox>
+
<table class="infobox" style="width:300px">
  <title source="title1">
+
 
    <default>{{PAGENAME}}</default>
+
{{ Infobox default title      | {{{name|{{PAGENAME}}}}} }}
  </title>
+
 
   <image source="image1">
+
{{ Infobox conditional image   | {{{image|}}}            }}
    <caption source="caption1"/>
+
{{ Infobox conditional caption | {{{caption|}}}          }}
  </image>
+
 
  <group collapse="open">
+
{{ Infobox conditional section
    <header>Stats</header>
+
| 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 -->
    <data source="element">
+
| title = Stats
      <label>Element</label>
+
|
    </data>
+
{{ Infobox conditional data   | Elements | {{{element|}}} }}
    <data source="level">
+
{{ Infobox conditional data   | Level    | {{{level|}}}  }}
      <label>Level</label>
+
{{ Infobox conditional data   | Skills  | {{{skills|}}}  }}
    </data>
+
{{ Infobox conditional data    | STR      | {{{str|}}}     }}
    <data source="skills">
+
{{ Infobox conditional data    | DEX      | {{{dex|}}}     }}
      <label>Skills</label>
+
{{ Infobox conditional data    | CON      | {{{con|}}}     }}
    </data>
+
{{ Infobox conditional data    | INT      | {{{int|}}}     }}
    <data source="str">
+
{{ Infobox conditional data    | WIS      | {{{wis|}}}     }}
      <label>STR</label>
+
{{ Infobox conditional data    | CHA      | {{{cha|}}}     }}
    </data>
+
{{ Infobox conditional caption | [[Stats Explained|What are these stats?]] }}
    <data source="dex">
+
}}
      <label>DEX</label>
+
 
    </data>
+
{{ Infobox conditional section
    <data source="con">
+
| cond = {{{general_body_type|}}}{{{prominent_features|}}}{{{height|}}}{{{weight|}}}
      <label>CON</label>
+
| title = Appearance
    </data>
+
|
    <data source="int">
+
{{ Infobox conditional data   | General Body Type | {{{general_body_type|}}}  }}
      <label>INT</label>
+
{{ Infobox conditional data   | Prominent Features | {{{prominent_features|}}} }}
    </data>
+
{{ Infobox conditional data   | Height            | {{{height|}}}            }}
    <data source="wis">
+
{{ Infobox conditional data   | Weight            | {{{weight|}}}            }}
      <label>WIS</label>
+
}}
    </data>
+
 
    <data source="cha">
+
{{ Infobox conditional section
      <label>CHA</label>
+
| cond = {{{territory|}}}{{{preferred_habitat|}}}
    </data>
+
| title = Environment
    <data>
+
|
        <default>{{#if:{{{str|}}}{{{con|}}}{{{dex|}}}{{{int|}}}{{{cha|}}}{{{wis|}}}|[[Stats Explained|What are these stats?]]}}</default>
+
{{ Infobox conditional data   | Territory        | {{{territory|}}}        }}
    </data>
+
{{ Infobox conditional data   | Preferred Habitat | {{{preferred_habitat|}}} }}
   
+
}}
  </group>
+
 
  <group>
+
</table>
    <header>Appearance</header>
+
 
    <data source="general_body_type">
 
      <label>General Body Type</label>
 
    </data>
 
    <data source="prominent_features">
 
      <label>Prominent Features</label>
 
    </data>
 
    <data source="height">
 
      <label>Height</label>
 
    </data>
 
    <data source="weight">
 
      <label>Weight</label>
 
    </data>
 
  </group>
 
  <group>
 
    <header>Environment</header>
 
    <data source="territory">
 
      <label>Territory</label>
 
    </data>
 
    <data source="preferred_habitat">
 
      <label>Preferred Habitat</label>
 
    </data>
 
  </group>
 
</infobox>
 
 
<noinclude>
 
<noinclude>
 
Example usage:<pre>
 
Example usage:<pre>
Line 88: 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
}}