Template:ItemList/Cargo

From Palia Wiki
Jump to navigation Jump to search

This template defines the table "ItemList". View table.

Template documentation
Note: portions of the template sample may not be visible without values provided.
View or edit the template documentation. (About template documentation)
Editors can experiment in this template's sandbox and test case pages.

Usage

{{ItemList}} is a template that stores {{ItemList}} data into Cargo

Syntax

{{ItemList/Cargo|id=}}

Examples

{{ItemList
 |Silk = 30
 |Stone = 500
 |Sapwood Plank = 1000
}}
{{ItemList/Cargo|id = testing}}

  • Silk 30 Silk
  • Stone 500 Stone
  • Sapwood Plank 1,000 Sapwood Plank


Cargo

ItemLists are stored in a Cargo table. The following parameters can be used for fetching the stored data:

Column Description
id A given identifier for the list (Should be something unique like cost, ingredients, recipe; Infoboxes usually use InfoboxIngredients).
item The item (In English)
amount The amount of the item
language The language that the localized name (l10n is in)
l10n A localized name of item, used for sorting, in the given language.

Examples

The following is an over-simplified example (With no formatting):

{{#cargo_query: tables = ItemList
 |fields = _pageName, item, amount
 |where = id = "testing" AND language = "{{PAGELANGUAGE}}"
}}
_pageName item amount
Template:ItemList/Cargo Sapwood Plank 1,000
Template:ItemList/Cargo Silk 30
Template:ItemList/Cargo Stone 500