Template:ItemList/Cargo/doc

From Palia Wiki
Jump to navigation Jump to search

Usage

{{ItemList/Cargo}} 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/doc Sapwood Plank 1,000
Template:ItemList/Cargo/doc Silk 30
Template:ItemList/Cargo/doc Stone 500