Template:Table

From Greyhawk Wiki
Jump to navigation Jump to search

This template creates a tightly spaced list of items with percentages beside each item.

The percentage table is designed to be used as a parameter within other templates. It can present up to 15 pairs of data.

It can technically be used for any information displayed as percentages, and can even be used outside of infoboxes, but it's primary use on this wiki is in infoboxes displaying the population of species in a given location, such as a settlement or realm.

Usage

Wikilinks can be used inside each "label" parameter.

The format is essentially "info|#|  info|#|  info|#". Fill in each label parameter with a word or phrase, and each data parameter with a numeber to displayed as a percentage.

Each "data" parameter should only include numeric characters—the template adds the "%" automatically.

{{table | label1 | data1 | label2 | data2 | label3 | etc. }}

If a more easily-readable code layout is desired, the individual parameters can also be listed vertically:

{{table |
 label1 | data1 |
 label2 | data2 |
 label3 | etc. }}

Examples

Greyhawk Realm
Lordship of the Isles
General information
Region:Eastern Flanaess
Government
Ruler:
Princess Ronthal III576
Prince Frolmar Ingerskatti591
NameYear
NameYear
Demographics
Population:2,376

This is an example of the percentage table template being used inside a {{Settlement}} template. The wikitext shown in both examples below produce the same infobox.

Example #1:

{{Realm
| name       = Lordship of the Isles
| region     = [[Eastern Flanaess]]
| population = 2,376
| ruler      = {{table|	Princess Ronthalasd asfeafd III |576 |Prince Frolmar Ingerskatti |591 |Name|Year |Name|Year | }}
}}

Example #2

{{Settlement
| name       = Diamond Lake
| realm      = [[Domain of Greyhawk]]
| population = 2,376
| races      = {{percentage table | 
[[Human]]s | 84 |
[[Elf|Elves]] | 9 |
[[Halfling]]s | 7|
[[Dwarf|Dwarves]] | 5 |
[[Orc]]s | 4 |
[[Tiefling]]s | 1 }}
}}