Template:Image rarity item: Difference between revisions
Jump to navigation
Jump to search
HiddenDragon (talk | contribs) (Created page with "<includeonly>{{#cargo_query: tables = item_icon | fields = TRIM(icon) = icon, CONCAT('', '{{{w|50}}}') = size, LOWER(rarity) = rarity, CONCAT('', "{{{1}}}") = page, CONCAT('', "{{{2|{{{1}}}}}}") = alias | where = {{#if: {{{uid|}}} | item_icon.uid = "{{{uid}}}" | item_icon._pageName="{{{1}}}" }} | limit = 1 | order by = item_icon._pageName | default = {{Image rarity item/Format|icon={{{1}}} Unfaded Icon.png|size={{{w|50}}}|rarity=common|pa...") |
HiddenDragon (talk | contribs) mNo edit summary |
||
Line 34: | Line 34: | ||
{ | { | ||
"params": { | "params": { | ||
" | "1": { | ||
"description": "The | "description": "The page of the item.", | ||
"example": "Potion of Healing", | "example": "Potion of Healing", | ||
"required": true, | "required": true, | ||
"type": "wiki-page-name" | "type": "wiki-page-name" | ||
}, | }, | ||
" | "2": { | ||
"description": "An alias for the item.", | "description": "An alias for the item.", | ||
"type": "string" | "type": "string" | ||
}, | }, | ||
" | "w": { | ||
"description": " | "description": "The size of the item icon.", | ||
"type": " | "suggestedvalues": [ | ||
"40", | |||
"25", | |||
"20" | |||
], | |||
"default": "50", | |||
"type": "number" | |||
}, | }, | ||
"uid": { | "uid": { | ||
Line 82: | Line 59: | ||
} | } | ||
}, | }, | ||
"description": " | "description": "Displays an item with rarity, with the icon above the text", | ||
"paramOrder": [ | "paramOrder": [ | ||
" | "1", | ||
"2", | |||
"uid", | "uid", | ||
" | "w" | ||
], | ], | ||
"format": "inline" | "format": "inline" | ||
} | } | ||
</templatedata></noinclude> | </templatedata></noinclude> |
Revision as of 07:28, 15 October 2024
See also: Template:RarityItem
This template is similar to RarityItem except it places the icon above the link to the item.
The default size is 50px (width and height).
Examples
Markup | Renders as |
---|---|
{{Image rarity item|Moondrop Pendant}} | Moondrop Pendant |
{{Image rarity item|Moondrop Pendant|Moon Pendant}} | Moon Pendant |
{{Image rarity item|Moondrop Pendant|w=80}} | Moondrop Pendant |
Template Data Section
Displays an item with rarity, with the icon above the text
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | The page of the item.
| Page name | required |
2 | 2 | An alias for the item. | String | optional |
uid | uid | If specified, will instead search by UID. | String | optional |
w | w | The size of the item icon.
| Number | optional |