Difference between revisions of "Template:Infobox location"

From Dwaia Wiki
Jump to navigation Jump to search
(Created page with "<table class="infobox" style="width:300px"> <tr> <th colspan="2" style="font-size:20px;">{{{title|{{PAGENAME}}}}}</th> </tr> {{#if:{{{image|}}}| <tr> <td colspan="2" style=...")
 
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<table class="infobox" style="width:300px">
+
<table class="infobox">
<tr>
+
 
<th colspan="2" style="font-size:20px;">{{{title|{{PAGENAME}}}}}</th>
+
{{ Infobox default title       | {{{title|}}} }}
</tr>
+
 
{{#if:{{{image|}}}|
+
{{ Infobox conditional image   | {{{image|}}}       }}
<tr>
+
{{ Infobox conditional caption | {{{caption|}}}     }}
  <td colspan="2" style="font-size:20px;text-align:center;">[[File:{{{image}}}|frameless]]</td>
+
{{ Infobox conditional image  | {{{map|}}}         }}
</tr>
+
{{ Infobox conditional caption | {{{mapcaption|}}}  }}
|}}
+
 
{{#if:{{{caption|}}}|
+
{{ Infobox conditional data    | Government      | {{{government|}}}  }}
<tr>
+
{{ Infobox conditional data    | Owner          | {{{owner|}}}       }}
  <td colspan="2" class="caption">{{{caption}}}</td>
+
 
</tr>
+
{{ Infobox conditional data    | Type            | {{{type|}}}         }}
|}}
+
{{ Infobox conditional data    | Element        | {{{element|}}}     }}
{{#if:{{{map|}}}|
+
{{ Infobox conditional data    | Level          | {{{level|}}}       }}
<tr>
+
{{ Infobox conditional data    | Location        | {{{location|}}}     }}
  <td colspan="2" style="font-size:20px;text-align:center;">[[File:{{{map}}}|frameless]]</td>
+
{{ Infobox conditional data    | Constituents    | {{{constituents|}}} }}
</tr>
+
 
|}}
+
{{ Infobox conditional image   | {{{flag|}}}       }}
{{#if:{{{mapcaption|}}}|
+
{{ Infobox conditional caption | {{{flagcaption|}}} }}
  <tr>
+
 
  <td colspan="2" class="caption">{{{mapcaption}}}</td>
+
{{ Infobox conditional data    | National Anthem | {{{anthem|}}}       }}
</tr>
+
{{ Infobox conditional data    | Inhabitants    | {{{inhabitants|}}}  }}
|}}
+
{{ Infobox conditional data    | Population      | {{{population|}}}  }}
{{#if:{{{type|}}}|
 
<tr>
 
   <td>Type</td>
 
  <td>{{{type}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{location|}}}|
 
<tr>
 
  <td>Location</td>
 
  <td>{{{location}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{location|}}}|
 
<tr>
 
  <td>Location</td>
 
  <td>{{{location}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{level|}}}|
 
<tr>
 
  <td>Level</td>
 
  <td>{{{level}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{constituents|}}}|
 
<tr>
 
  <td>Constituents</td>
 
  <td>{{{constituents}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{owner|}}}|
 
<tr>
 
  <td>Owner</td>
 
  <td>{{{owner}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{flag|}}}|
 
<tr>
 
   <td colspan="2" style="font-size:20px;text-align:center;">[[File:{{{flag}}}|frameless]]</td>
 
</tr>
 
|}}
 
{{#if:{{{flagcaption|}}}|
 
<tr>
 
  <td colspan="2" class="caption">{{{flagcaption}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{anthem|}}}|
 
<tr>
 
  <td>Anthem</td>
 
  <td>{{{anthem}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{anthem|}}}|
 
<tr>
 
  <td>Anthem</td>
 
  <td>{{{anthem}}}</td>
 
</tr>
 
|}}
 
{{#if:{{{inhabitants|}}}|
 
<tr>
 
  <td>Inhabitants</td>
 
  <td>{{{inhabitants}}}</td>
 
  </tr>
 
|}}
 
{{#if:{{{population|}}}|
 
<tr>
 
   <td>population</td>
 
  <td>{{{population}}}</td>
 
</tr>
 
|}}
 
 
</table>
 
</table>
  
 
<noinclude>
 
<noinclude>
Example usage:<pre>
+
Example usage:
{{Infobox species
+
<pre>
|title1=Example
+
{{Infobox location
|image1=Example
+
|title        = Example
|caption1=Example
+
|image        = Placeholder.png
|element=Example
+
|caption      = Example
|level=Example
+
|mapimage    = Placeholder.png
|skills=Example
+
|mapcaption  = Example
|str=Example
+
|government  = Example
|con=Example
+
|owner        = Example
|dex=Example
+
|type        = Example
|int=Example
+
|level        = Example
|cha=Example
+
|location    = Example
|wis=Example
+
|constituents = Example
|general_body_type=Example
+
|flag        = Placeholder.png
|prominent_features=Example
+
|flagcaption  = Example
|height=Example
+
|anthem      = Example
|weight=Example
+
|inhabitants  = Example
|territory=Example
+
|population  = Example
|preferred_habitat=Example
 
 
}}
 
}}
 
</pre>
 
</pre>
 +
...produces...
 +
{{Infobox location
 +
|title        = Example
 +
|image        = Placeholder.png
 +
|caption      = Example
 +
|mapimage    = Placeholder.png
 +
|mapcaption  = Example
 +
|government  = Example
 +
|owner        = Example
 +
|type        = Example
 +
|level        = Example
 +
|location    = Example
 +
|constituents = Example
 +
|flag        = Placeholder.png
 +
|flagcaption  = Example
 +
|anthem      = Example
 +
|inhabitants  = Example
 +
|population  = Example
 +
}}
 +
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 14:10, 6 February 2019


Example usage:

{{Infobox location
|title        = Example
|image        = Placeholder.png
|caption      = Example
|mapimage     = Placeholder.png
|mapcaption   = Example
|government   = Example
|owner        = Example
|type         = Example
|level        = Example
|location     = Example
|constituents = Example
|flag         = Placeholder.png
|flagcaption  = Example
|anthem       = Example
|inhabitants  = Example
|population   = Example
}}

...produces...

Example
Placeholder.png
Example
Example
Government Example
Owner Example
Type Example
Level Example
Location Example
Constituents Example
Placeholder.png
Example
National Anthem Example
Inhabitants Example
Population Example