Template:Data Table Copy
Purpose
Creates a copy of a {{Data Table}}
located on another page.
Usage
{{Data Table Copy |fromPage= |storedAs= }}
{{Data Table Copy |fromPage= |storedAs= |columns= |excludeColumns= |rowsWith= |rowsExcluding= |responsiveModeEnabled= }}
Parameter | Status | Description |
---|---|---|
fromPage | required | The name of the wiki page containing the data table to be copied. |
storedAs | required | The internal name of the table to be copied, as specified by the storeAs parameter of Template:Data Table. |
columns | optional | A comma-separated list of columns to copy. If absent, all columns are copied. |
excludeColumns | optional | A comma-separated list of columns not to copy. If absent, all columns are copied. Ignored if columns is present. |
rowsWith | optional | If specified, only rows containing the given string will be copied. If absent, all rows are copied. |
rowsExcluding | optional | If specified, only rows which do not contain the given string will be copied. |
responsiveModeEnabled | optional | Data tables have a responsive "mobile-friendly" mode which by default is turned on when:
true or false , respectively. |
Examples
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines }}
Figurine | |
---|---|
Number | 001 |
Description | A young boy who lives in Hyrule. He is close friends with Princess Zelda. |
Subject(s) | |
Pictured | |
Figurine | |
Number | 002 |
Description | A young boy on a quest with Ezlo to restore the Four Sword. |
Subject(s) | |
Pictured | |
Figurine | |
Number | 003 |
Description | A bright and cheery princess from Hyrule's royal family. |
Subject(s) | |
Pictured |
Figurine | Number | Description | Subject(s) | Pictured |
---|---|---|---|---|
001 | A young boy who lives in Hyrule. He is close friends with Princess Zelda. | |||
002 | A young boy on a quest with Ezlo to restore the Four Sword. | |||
003 | A bright and cheery princess from Hyrule's royal family. |
columns
parameter to copy specific columns
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines |columns= Figurine, Description }}
Figurine | |
---|---|
Description | A young boy who lives in Hyrule. He is close friends with Princess Zelda. |
Figurine | |
Description | A young boy on a quest with Ezlo to restore the Four Sword. |
Figurine | |
Description | A bright and cheery princess from Hyrule's royal family. |
Figurine | Description |
---|---|
A young boy who lives in Hyrule. He is close friends with Princess Zelda. | |
A young boy on a quest with Ezlo to restore the Four Sword. | |
A bright and cheery princess from Hyrule's royal family. |
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines |columns= Figurine, Not a Column }}
Figurine | |
---|---|
Number | 001 |
Description | A young boy who lives in Hyrule. He is close friends with Princess Zelda. |
Subject(s) | |
Pictured | |
Figurine | |
Number | 002 |
Description | A young boy on a quest with Ezlo to restore the Four Sword. |
Subject(s) | |
Pictured | |
Figurine | |
Number | 003 |
Description | A bright and cheery princess from Hyrule's royal family. |
Subject(s) | |
Pictured |
Figurine | Number | Description | Subject(s) | Pictured |
---|---|---|---|---|
001 | A young boy who lives in Hyrule. He is close friends with Princess Zelda. | |||
002 | A young boy on a quest with Ezlo to restore the Four Sword. | |||
003 | A bright and cheery princess from Hyrule's royal family. |
Using rowsWith
to copy rows containing a certain string, and using excludeColumns
to prevent certain columns from being copied.
Note that a Link figurine is returned as the description mentions the word "Zelda".
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines |rowsWith= Zelda |excludeColumns= Subject(s), Pictured }}
Figurine | |
---|---|
Number | 001 |
Description | A young boy who lives in Hyrule. He is close friends with Princess Zelda. |
Figurine | |
Number | 002 |
Description | A young boy on a quest with Ezlo to restore the Four Sword. |
Figurine | |
Number | 003 |
Description | A bright and cheery princess from Hyrule's royal family. |
Figurine | Number | Description |
---|---|---|
001 | A young boy who lives in Hyrule. He is close friends with Princess Zelda. | |
002 | A young boy on a quest with Ezlo to restore the Four Sword. | |
003 | A bright and cheery princess from Hyrule's royal family. |
rowsWith
and rowsExcluding
parameters accept Lua patterns. This is particularly useful for doing exact matches with ^
(string beginning) and $
(string ending).
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines |rowsWith= ^Princess Zelda$ |excludeColumns= Subject(s), Pictured }}
Figurine | |
---|---|
Number | 003 |
Description | A bright and cheery princess from Hyrule's royal family. |
rowsExcluding
to copy all rows except those containing a certain string
{{Data Table Copy |fromPage= Template:Data Table |storedAs= TMC Figurines |rowsExcluding= Zelda |excludeColumns= Subject(s), Pictured }}
As
tag to rename a column
{{Data Table Copy |fromPage= Monster Part |storedAs= Monster Parts |columns= Monster Part [As:Material], Sell Price [Colspan:2], Rupees, Mon |rowsWith= Ancient }}
{{Data Table Copy |fromPage= Not a Page |storedAs= Not a Table }}
{{Data Table Copy |fromPage= Template:Data Table |storedAs= SS Upgrades |rowsWith= invalid row query }}