Template:IsValidItemId
(Redirected from Template:IsItemID)
Jump to navigation
Jump to search
Documentation The documentation below is transcluded from Template:IsValidItemId/doc. (edit | history)
[purge]
This template is used to check if a given input is a valid item ID. This is mainly useful for other templates.
Usage
{{ isItemID | <string to check> | includeUnused = y (optional) }}
- First unnamed parameter
The string to check.
- includeUnused
When set to y
, still outputs "y" if the given input is ID of an "Unused" item (defined in Module:Iteminfo/idSets/data). For use in {{item infobox}}.
Examples
Code | Result |
---|---|
{{isItemID|1}} |
y |
{{isItemID|0}} |
|
{{isItemID|5455}} |
y |
{{isItemID|5456}} |
|
{{isItemID|42}} |
y |
{{isItemID|+42}} |
y |
{{isItemID|-42}} |
|
{{isItemID|40+2}} |
|
{{isItemID|42.0}} |
y |
{{isItemID|}} |
|
{{isItemID|x}} |
|
{{isItemID|4722}} |
|
{{isItemID|4722|includeUnused=y}} |
y |