Zelda Wiki

Want to contribute to this wiki?
Sign up for an account, and get started!

Come join the Zelda Wiki community Discord server!

READ MORE

Zelda Wiki

Purpose

Displays tabular data in a way that is mobile-friendly. Minimizes the amount of boilerplate wikitext that most Zelda Wiki tables require. Automatically center-aligns columns and applies templates such as {{Term}}, {{Item Amount}}, {{Sort Value}}, etc.

The table data can stored in Cargo so that the table (or a subset of its rows) can be displayed on other relevant pages using {{Data Table Copy}}.

Usage

SyntaxBoilerplate
{{Data Table
|game= 
|storeAs= 
|sortable= 
|stretch= 
|columns= 
|<cell1>
|<cell2>
|<cell3>
|...
|<cellN>
}}
{{Data Table
|game= 
|storeAs= 
|sortable= 
|stretch= 
|columns= 
|
|
|
}}
ParameterStatusDescriptionAccepted values
gameoptionalA game code. Used to automatically apply game-based templates (e.g. {{Term}}, {{Item Amount}}, {{Sort Value}}) to table cells.See Data:Franchise
storeAsoptional

If present, the data is stored in the DataTables Cargo table under the given name. Other pages can retrieve the data by that name using {{Data Table Copy}}.

When a page has multiple data tables, each storeAs value must be unique.

sortableoptionalIf set to false, the data table will not be sortable.
stretchoptionalIf present and set to anything other than false, the data table will stretch to the full width of the page.
columnsrequiredComma-separated list of column headers. One or more tag can be appended to each column to indicate how the template should handle data in that column. See #Tags below.
  • 1
  • .
  • .
  • N
cellsrequiredCell values. Type |- to separate rows, as shown in the examples below.

<p>Displays tabular data in a way that is mobile-friendly. Minimizes the amount of boilerplate wikitext that most {{SITENAME}} tables require. Automatically center-aligns columns and applies templates such as {{Template|Term}}, {{Template|Item Amount}}, {{Template|Sort Value}}, etc.</p><p>The table data can stored in [[Special:CargoTables/DataTables|Cargo]] so that the table (or a subset of its rows) can be displayed on other relevant pages using {{Template|Data Table Copy}}.

Template parameters

ParameterDescriptionTypeStatus
gamegame

A game code. Used to automatically apply game-based templates (e.g. {{Template|Term}}, {{Template|Item Amount}}, {{Template|Sort Value}}) to table cells.

Stringoptional
storeAsstoreAs

<p>If present, the data is stored in the [[Special:CargoTables/DataTables|DataTables]] Cargo table under the given name. Other pages can retrieve the data by that name using {{Template|Data Table Copy}}.</p><p>When a page has multiple data tables, each <code>storeAs</code> value must be unique.</p>

Stringoptional
sortablesortable

If set to <code>false</code>, the data table will not be sortable.

Booleanoptional
stretchstretch

If present and set to anything other than <code>false</code>, the data table will stretch to the full width of the page.

Booleanoptional
columnscolumns

Comma-separated list of column headers. One or more '''tag''' can be appended to each column to indicate how the template should handle data in that column. See [[#Tags]] below.

Contentrequired
cells...

Cell values. Type <code>|-</code> to separate rows, as shown in the examples below.

Contentrequired

Tags[]

The following tags can be added to columns to modify their content:

TagAlignmentSortabilityEffects
  • [Amount]
  • [Amounts]
Left
Sortable
  • Applies {{Item Amount}} to each cell in the column. Commas are treated as list separators for specifying multiple amounts.
[Description]
Left
Unsortable
Text is shown as-is.
  • [Image]
  • [Image:fileType:size]
Center
Unsortable
  • Displays an image in each cell. fileType defaults to Icon for 3D games, Sprite for 2D games. size defaults to 64x64px.
  • Applies {{Term}} to each cell.
  • Bolds cells in the column.
[List]
Center
Unsortable
Treats commas as list delimiters.
[Rupees]
Left
Unsortable
  • Applies {{Rupee}} to each cell in the column.
[SectionLink]
Center
Sortable
When copied, each cell will link to its row in its source table.
[SortValue]
Center
Sortable
  • Applies {{Sort Value}} to each cell in the column.
  • [Term]
  • [Terms]
Center
Sortable
  • Applies {{Term List}} to each cell in the column. Commas are treated as list separators for specifying multiple terms.
Tag
  • [Amount]
  • [Amounts]
Alignment
Left
Sortability
Sortable
Effects
  • Applies {{Item Amount}} to each cell in the column. Commas are treated as list separators for specifying multiple amounts.
Tag
[Description]
Alignment
Left
Sortability
Unsortable
Effects
Text is shown as-is.
Tag
  • [Image]
  • [Image:fileType:size]
Alignment
Center
Sortability
Unsortable
Effects
  • Displays an image in each cell. fileType defaults to Icon for 3D games, Sprite for 2D games. size defaults to 64x64px.
  • Applies {{Term}} to each cell.
  • Bolds cells in the column.
Tag
[List]
Alignment
Center
Sortability
Unsortable
Effects
Treats commas as list delimiters.
Tag
[Rupees]
Alignment
Left
Sortability
Unsortable
Effects
  • Applies {{Rupee}} to each cell in the column.
Tag
[SectionLink]
Alignment
Center
Sortability
Sortable
Effects
When copied, each cell will link to its row in its source table.
Tag
[SortValue]
Alignment
Center
Sortability
Sortable
Effects
  • Applies {{Sort Value}} to each cell in the column.
Tag
  • [Term]
  • [Terms]
Alignment
Center
Sortability
Sortable
Effects
  • Applies {{Term List}} to each cell in the column. Commas are treated as list separators for specifying multiple terms.

The following tags modify other aspects of the table besides the actual cell content. Some of these do not carry over to copies of the table.

TagCopied?Effects
[ID]
Not Copied
Sets the value of the cell as the ID of the table row so that the table row can be linked by that name. See Template:Section for more information. Only one column can have this tag.
[Unsortable]
Copied
Renders the column unsortable.
[Width:width]
Not Copied
Sets the width of the column, where width is a CSS length unit.
Tag
[ID]
Copied?
Not Copied
Effects
Sets the value of the cell as the ID of the table row so that the table row can be linked by that name. See Template:Section for more information. Only one column can have this tag.
Tag
[Unsortable]
Copied?
Copied
Effects
Renders the column unsortable.
Tag
[Width:width]
Copied?
Not Copied
Effects
Sets the width of the column, where width is a CSS length unit.

Examples[]

Input
{{Data Table
|game= PH
|storeAs= Treasure Maps
|columns= Treasure Map [Term], Location [Term], Destination [Term], Treasure [Term], Bonus Rupees [Amounts], Total Rupees [Rupees]
|-
| Treasure Map 3
| Isle of Ember
| Northwestern Sea
| Ship Part
| 1 Big Green Rupee, 12 Green Rupee
| 102
|-
| Treasure Map 26
| Traveler's Ship<br/>{{Small|([[Northeastern Sea]])}}
| Northeastern Sea
| Ship Part
| 1 Red Rupee, 1 Blue Rupee, 5 Green Rupee
| 30
}}
Output
Treasure Map
Location
Destination
Treasure
Bonus Rupees
Total Rupees
PH Green Rupee Icon 102 Rupees
Treasure Map
Location
Destination
Treasure
Bonus Rupees
Total Rupees
PH Green Rupee Icon 30 Rupees
Categories Added
Input
{{Data Table
|game= SS
|storeAs= SS Upgrades
|sortable= false
|stretch= true
|columns= Item [Image][Term], Upgrade [Image][Term], Materials [Amounts], Cost [Rupees], Location [Term], Description [Description]
|-
| Wooden Shield
| Banded Shield
| 2 Amber Relic, 1 Monster Claw, 1 Jelly Blob
| 30
| Scrap Shop
| Increased durability.
|-
| Banded Shield
| Braced Shield
| 3 Amber Relic, 2 Monster Claw, 2 Tumbleweed, 1 Ornamental Skull
| 50
| Scrap Shop
| Further increased durability.
|-
| Beetle
| Hook Beetle
| N/A
| N/A
| Lanayru Desert
| Ability to grab items.
}}
Output
ItemUpgradeMaterialsCostLocationDescription
SS Green Rupee Icon 30 Rupees
Increased durability.
SS Green Rupee Icon 50 Rupees
Further increased durability.
N/A
N/A
Ability to grab items.
Item
Upgrade
Materials
Cost
SS Green Rupee Icon 30 Rupees
Location
Description
Increased durability.
Item
Upgrade
Materials
Cost
SS Green Rupee Icon 50 Rupees
Location
Description
Further increased durability.
Item
Upgrade
Materials
N/A
Cost
N/A
Location
Description
Ability to grab items.
Input
{{Data Table
|game= TMC
|storeAs= TMC Figurines
|columns= Figurine [Image:Figurine Sprite][SectionLink], Number, Subject(s) [Terms], Pictured [Unsortable][Width:20%], Description [Description]
|-
| Capless [Player Name]
| 001
| Link
| {{Term|TMC|Link|link}}
| A young boy who lives in Hyrule. He is<br/>close friends with Princess Zelda.
|-
| Princess Zelda
| 003
| Princess Zelda
| {{Term|TMC|Princess Zelda|link}}
| A bright and cheery princess from<br/>Hyrule's royal family.<br/>She loves to sneak out of the castle<br/>to visit her good friend, [Player Name].
|- 
| Chuchu
| 118
| Chuchu, Blue Chuchu, Green Chuchu, Red Chuchu
| A {{Term|TMC|Blue Chuchu|link}}, a {{Term|TMC|Green Chuchu|link}}, and a {{Term|TMC|Red Chuchu|link}}
| Appears in various areas.<br/>Chuchus come in many colors.<br/>Each color is a little different, but<br/>ranged weapons work well against all.
}}
Output
FigurineNumberSubject(s)PicturedDescription
001
A young boy who lives in Hyrule. He is
close friends with Princess Zelda.
003
A bright and cheery princess from
Hyrule's royal family.
She loves to sneak out of the castle
to visit her good friend, Link.
118
Appears in various areas.
Chuchus come in many colors.
Each color is a little different, but
ranged weapons work well against all.
Figurine
Number
001
Subject(s)
Pictured
Description
A young boy who lives in Hyrule. He is
close friends with Princess Zelda.
Figurine
Number
003
Subject(s)
Pictured
Description
A bright and cheery princess from
Hyrule's royal family.
She loves to sneak out of the castle
to visit her good friend, Link.
Figurine
Number
118
Subject(s)
Pictured
Description
Appears in various areas.
Chuchus come in many colors.
Each color is a little different, but
ranged weapons work well against all.
Input
{{Data Table
|game= TWW
|storeAs= TWW Figurines
|columns= Figurine [Image:Figurine Model:x150px][SectionLink], Subject(s) [Terms], Description [Description]
|-
| Darknut
| Darknut
| Habitat: [[Tower of the Gods]]<br/>Spoils: [[Knight's Crest]]<br/><br/>These mighty knights are protected by heavy-duty armor. Rather than attacking from the front, it might be best to slip around behind them and cut their armor off.
|-
| Darknut [2]
| Darknut
| Habitat: [[Earth Temple (The Wind Waker)|Earth Temple]]<br/>Spoil: [[Knight's Crest]]<br/><br/>These knights are well protected by their round bucklers and mighty armor. If you use a [[Parry|parry attack]] to jump up and knock off their helmets, it'll spell their doom.
}}
Output
FigurineSubject(s)Description
Habitat: Tower of the Gods
Spoils: Knight's Crest

These mighty knights are protected by heavy-duty armor. Rather than attacking from the front, it might be best to slip around behind them and cut their armor off.
Habitat: Earth Temple
Spoil: Knight's Crest

These knights are well protected by their round bucklers and mighty armor. If you use a parry attack to jump up and knock off their helmets, it'll spell their doom.
Figurine
Subject(s)
Description
Habitat: Tower of the Gods
Spoils: Knight's Crest

These mighty knights are protected by heavy-duty armor. Rather than attacking from the front, it might be best to slip around behind them and cut their armor off.
Figurine
Subject(s)
Description
Habitat: Earth Temple
Spoil: Knight's Crest

These knights are well protected by their round bucklers and mighty armor. If you use a parry attack to jump up and knock off their helmets, it'll spell their doom.
The above documentation is transcluded from Template:Data Table/Documentation. (edit | history)