Template:Game icon format
Jump to navigation
Jump to search
SMW formatting template for rendering the {{Game icon}} of the result of an arbitrary {{#ask}} query.
Invoke with named args=yes and link=none. Parameters:
- Pagename
- Has context
- Has game icon
- Has game icon frame type
- Has canonical name
- Has dye channels
The query userparam can be used to pass additional parameters that aren't part of the query. If used, it should contain the following parameters from {{Game icon}}, with no extra whitespace, separated by semicolon: text;size;hq;qty;wrap
- text: Text override for the label. Leave blank to use canonical name; pass
xto omit label. - size: One of small, mid, big
- hq: For items, renders high-quality item.
- qty: For items, renders a specific quantity or range of quantities.
- wrap: Controls text wrapping within item label.
- original_pagename: The way the icon link was originally specified, before redirects are resolved (as opposed to the "Pagename" query param which is after redirects are resolved). Used to ensure the link text and target remains exactly as typed, but if this is empty then the "Pagename" query param is used instead.
Example
| Markup | Renders as |
|---|---|
{{#ask:[[Has internal ID::25952]]
|?=Pagename
|?Has context
|?Has game icon
|?Has canonical name
|?Has dye channels
|format=plainlist
|link=none
|named args=yes
|template=Game icon format
|userparam=;big;n;1;n
}}
|
Test case: userparam text being x should suppresses label, but should *not* prevent the image from having alt text
| Markup | Renders as |
|---|---|
{{#ask:[[Has internal ID::25952]]
|?=Pagename
|?Has context
|?Has game icon
|?Has canonical name
|?Has dye channels
|format=plainlist
|link=none
|named args=yes
|template=Game icon format
|userparam=x;big;n;;n
}}
|
|