Difference between revisions of "Template:SpoilerIconSelector/doc"
Jump to navigation
Jump to search
>Boblers |
>Boblers (expanding documentation) |
||
| Line 1: | Line 1: | ||
{{doc/start}} | {{doc/start}} | ||
| − | This template | + | This template reads the input IsPlayable field, and outputs an icon that uses [[Template:TooltipIcon]] or [[Template:SpoilerIcon]]. |
This is called by the queries on [[Dragalia Lost Wiki/New Content]] to decide whether a new item should be marked as a spoiler or not. It is not meant to be called outside of that page. | This is called by the queries on [[Dragalia Lost Wiki/New Content]] to decide whether a new item should be marked as a spoiler or not. It is not meant to be called outside of that page. | ||
==Usage== | ==Usage== | ||
| − | <pre>{{SpoilerIconSelector| | + | <pre> |
| + | {{SpoilerIconSelector | ||
| + | |Type= | ||
| + | |Name= //unit's name | ||
| + | |text= //0 or 1 to display text | ||
| + | |IsPlayable= //0 or 1 for spoiler or non-spoiler | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | ==Template Fields== | ||
| + | '''Type:''' can be one of: [Adventurer, Dragon, Weapon, Wyrmprint]. Matches the functionality of this field in [[Template:TooltipIcon]]. | ||
| + | |||
| + | '''Name:''' is the name of the icon's subject | ||
| + | |||
| + | '''text:''' can be 1 or 0 to display text or not display text, respectively | ||
| + | |||
| + | '''IsPlayable:''' can be 1 or 0 to indicate a non-spoiler or a spoiler, respectively. This will be used to select the resulting template. | ||
==Examples== | ==Examples== | ||
| − | * selecting SpoilerIcon with input 0: | + | * selecting SpoilerIcon with IsPlayable input of 0: |
| − | <pre>{{SpoilerIconSelector|0}}</pre> | + | <pre>{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=0}}</pre> |
| − | {{SpoilerIconSelector|0}} | + | {{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=0}} |
| − | * selecting TooltipIcon with input 1 (this is also | + | * selecting TooltipIcon with IsPlayable input of 1 (this is also the default): |
| − | <pre>{{SpoilerIconSelector|1}}</pre> | + | <pre>{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=1}}</pre> |
| − | {{SpoilerIconSelector|1}} | + | {{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=1}} |
{{doc/end}} | {{doc/end}} | ||
Revision as of 20:18, 22 June 2020
This template reads the input IsPlayable field, and outputs an icon that uses Template:TooltipIcon or Template:SpoilerIcon.
This is called by the queries on Dragalia Lost Wiki/New Content to decide whether a new item should be marked as a spoiler or not. It is not meant to be called outside of that page.
Usage
{{SpoilerIconSelector
|Type=
|Name= //unit's name
|text= //0 or 1 to display text
|IsPlayable= //0 or 1 for spoiler or non-spoiler
}}
Template Fields
Type: can be one of: [Adventurer, Dragon, Weapon, Wyrmprint]. Matches the functionality of this field in Template:TooltipIcon.
Name: is the name of the icon's subject
text: can be 1 or 0 to display text or not display text, respectively
IsPlayable: can be 1 or 0 to indicate a non-spoiler or a spoiler, respectively. This will be used to select the resulting template.
Examples
- selecting SpoilerIcon with IsPlayable input of 0:
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=0}}
- selecting TooltipIcon with IsPlayable input of 1 (this is also the default):
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|IsPlayable=1}}