Template:ItemType: Difference between revisions
From Archaelund Wiki
(Created page with "<onlyinclude><includeonly>{{#switch:{{{1|}}} |TagList = Food; Gem; Hide; Ingredient; Key; Potion; Scroll |Food = Food |Gem = Gem |Hide = Hide |Ingredient = Ingredient |Key = K...") |
No edit summary |
||
| Line 6: | Line 6: | ||
|Ingredient = Ingredient | |Ingredient = Ingredient | ||
|Key = Key | |Key = Key | ||
|Misc = Miscellaneous | |||
|Potion = Potion | |Potion = Potion | ||
|Scroll = Scroll | |Scroll = Scroll | ||
Revision as of 08:24, 17 August 2023
Description
This template contains the predefined item types to be used within Template:Item and takes the corresponding tags (Food • Gem • Hide • Ingredient • Key • Potion • Scroll) as input. The output is the description to be displayed on the Wiki page.
Usage
{{ItemType|<tag>}}
For generating a semicolon-separated list of all available tags (intended for documentation purposes) use
{{ItemType|TagList}}
Tag options
| Tag | Output |
|---|---|
| Document | |
| Gem | Gem |
| Ingredient | Ingredient |
| Key | Key |
| Material | |
| Other | |
| Potion | Potion |
| Recipe | |
| Scroll | Scroll |
| Special | |
| Treasure |
How to add new item types
In order to add a new type, you have to insert a new case in the template's #switch structure (only parts indicated by <...> may be edited):
|<NewTag> = <output text>
Also, add the new tag to the existing TagList case so it will appear in any documentation:
|TagList = ...; <NewTag>; ...
View/Edit documentation page