Difference between revisions of "Template:Transient icon"
Jump to navigation
Jump to search
m |
(add show name parameter) |
||
Line 22: | Line 22: | ||
| small | | small | ||
|#default = small | |#default = small | ||
}},link={{{link|}}} | }},link={{{link|}}},show name={{#switch:{{lc:{{{show name|n}}}}}| | ||
| n | |||
|#default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}} | |||
| y = y | |||
}} | |||
|limit=1 | |limit=1 | ||
|sort=Has rarity | |sort=Has rarity | ||
Line 56: | Line 60: | ||
| small | | small | ||
|#default = small | |#default = small | ||
}},link={{{link|}}} | }},link={{{link|}}},show name={{#switch:{{lc:{{{show name|n}}}}}| | ||
| n | |||
|#default = {{#ifeq:{{lc:{{{size|small}}}}}|small|y|n}} | |||
| y = y | |||
}} | |||
|limit=1 | |limit=1 | ||
|sort=Has rarity | |sort=Has rarity | ||
Line 82: | Line 90: | ||
| link = | | link = | ||
| subobject = | | subobject = | ||
| show name = | |||
}}</pre> | }}</pre> | ||
Line 92: | Line 101: | ||
; size : Set to ''small'', ''medium'' or ''large'' to change the size of the icon. When set to ''small'', also displays the companion's English name. Defaults to ''small''. | ; size : Set to ''small'', ''medium'' or ''large'' to change the size of the icon. When set to ''small'', also displays the companion's English name. Defaults to ''small''. | ||
; link : Page that the icon should link to. Defaults to the page of the companion. | ; link : Page that the icon should link to. Defaults to the page of the companion. | ||
; show name : Set to ''y'' to show the name, ''n'' to hide. Defaults to ''y'' if '''size''' is set to ''small'', ''n'' otherwise. | |||
; subobject : Subobject of the companion. Can be used by other templates to directly display the correct companion. Do not use this parameter manually. | ; subobject : Subobject of the companion. Can be used by other templates to directly display the correct companion. Do not use this parameter manually. | ||
Revision as of 19:20, 23 May 2017
Description
This template displays a link to a companion together with its icon. If multiple companions would fit the search criteria, only the one with the lowest rarity of the standard variant is displayed.
Usage
{{Companion icon |<en companion name> | rarity = | variant = | link = | subobject = | show name = }}
Parameters
- en companion name
- Required. Name of the companion
- rarity
- Filter result by the rarity of the companion.
- variant
- Filter result by the variant of the companion.
- frame
- Set to y to also display a frame with rarity, element and weapon type of the companion, n to only display the icon. Defaults to n.
- size
- Set to small, medium or large to change the size of the icon. When set to small, also displays the companion's English name. Defaults to small.
- link
- Page that the icon should link to. Defaults to the page of the companion.
- show name
- Set to y to show the name, n to hide. Defaults to y if size is set to small, n otherwise.
- subobject
- Subobject of the companion. Can be used by other templates to directly display the correct companion. Do not use this parameter manually.
Examples
{{Companion icon|Moritaka}}
Moritaka
{{Companion icon|Moritaka|size=large}}
{{Companion icon|Moritaka|size=medium|frame=y}}
{{Companion icon|Moritaka|rarity=4}}
Moritaka
{{Companion icon|Moritaka|variant=Valentine|frame=y}}
20x20px Moritaka