Template:Item/Food/Category/doc: Difference between revisions

From Vintage Story Wiki
(Created page with "<noinclude><languages /></noinclude> <templatedata> { "params": { "1": { "label": "Food category id", "example": "protein", "default": "unknown", "required": true, "description": "case-insensitive", "type": "string" } }, "description": "Returns food category name by it's id. Support translations." } </templatedata> == Usage == <pre>{{Item/Food/Category|category id}}</pre> === Examples === {| class="wikitable" |+ Allowed food category ids |- !...")
 
(No difference)

Latest revision as of 15:56, 11 December 2023

Returns food category name by it's id. Support translations.

Template parameters

ParameterDescriptionTypeStatus
Food category id1

case-insensitive

Default
unknown
Example
protein
Stringrequired

Usage

{{Item/Food/Category|category id}}

Examples

Allowed food category ids
id Code Result
fruit {{Item/Food/Category|fruit}}

Fruit

vegetable {{Item/Food/Category|vegetable}}

Vegetable

grain {{Item/Food/Category|grain}}

Grain

protein {{Item/Food/Category|protein}}

Protein

grain {{Item/Food/Category|grain}}

Grain

dairy {{Item/Food/Category|dairy}}

Dairy

nonutrition {{Item/Food/Category|nonutrition}}

No nutrition

unknown {{Item/Food/Category|unknown}}

Unknown