Difference between revisions of "Template:SpoilerIconSelector/doc"

From Dragalia Lost Wiki
Jump to navigation Jump to search
>Boblers
(creating documentation)
>Boblers
(updating to use Spoiler)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{doc/start}}
 
{{doc/start}}
This template selects the name "TooltipIcon" or "SpoilerIcon" depending on the input IsPlayable field.
+
This template reads the input Spoiler 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>
IsPlayable=
+
{{SpoilerIconSelector
}}</pre>
+
|Type=
 +
|Name=
 +
|text=
 +
|IsPlayable=
 +
}}
 +
</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
 +
 
 +
'''Spoiler:''' can be 1 or 0 to indicate a spoiler or a non-spoiler, respectively. This will be used to select the resulting template.
  
 
==Examples==
 
==Examples==
<pre>{{SpoilerIconSelector|
+
* selecting TooltipIcon with Spoiler input of 1 :
IsPlayable=0
+
<pre>{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=1}}</pre>
}}</pre>
+
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=1}}
{{SpoilerIconSelector|
 
IsPlayable=0
 
}}
 
 
 
<pre>{{SpoilerIconSelector|
 
IsPlayable=1
 
}}</pre>
 
{{SpoilerIconSelector|
 
IsPlayable=1
 
}}
 
  
 +
* selecting SpoilerIcon with Spoiler input of 0 (this is also the default):
 +
<pre>{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=0}}</pre>
 +
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=0}}
 
{{doc/end}}
 
{{doc/end}}

Latest revision as of 21:36, 22 June 2020

50px Documentation

This template reads the input Spoiler 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=
|text=
|IsPlayable=
}}

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

Spoiler: can be 1 or 0 to indicate a spoiler or a non-spoiler, respectively. This will be used to select the resulting template.

Examples

  • selecting TooltipIcon with Spoiler input of 1 :
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=1}}
  • selecting SpoilerIcon with Spoiler input of 0 (this is also the default):
{{SpoilerIconSelector|Type=Adventurer|Name=The Prince|text=1|Spoiler=0}}
Unknown.png
Error: Table Adventurers not found.