Difference between revisions of "Template:Item/CardIcon"

From A3! Wiki
(Create template to only show card icon that links to card page)
 
(Added image size option + removed unnecessary attribute option)
Line 1: Line 1:
<includeonly>{{#ifeq: {{{4|}}} | y |{{#cargo_query:tables=Cards,Card_Files|join on=Cards.number = Card_Files.number|fields=CONCAT('[[File:', Card_Files.icon2, "|link=", CONCAT('Cards/', Cards.chara, '/', Cards.cardname), ']] ')|where=Cards.cardname = "{{{1}}}" AND Cards.chara LIKE "{{{2|}}}%" AND Cards.attribute LIKE "{{{3|}}}%"|format=list|default=}}|{{#cargo_query:tables=Cards,Card_Files|join on=Cards.number = Card_Files.number|fields=CONCAT('[[File:', Card_Files.icon1, "|link=", CONCAT('Cards/', Cards.chara, '/', Cards.cardname), ']] ')|where=Cards.cardname = "{{{1}}}" AND Cards.chara LIKE "{{{2|}}}%" AND Cards.attribute LIKE "{{{3|}}}%"|format=list|default=}}}}</includeonly><noinclude>
+
<includeonly>{{#ifeq: {{{3|}}} | y |{{#cargo_query:tables=Cards,Card_Files|join on=Cards.number = Card_Files.number|fields=CONCAT('[[File:', Card_Files.icon2, "|link=", CONCAT('Cards/', Cards.chara, '/', Cards.cardname), '|{{{4|}}}]] ')|where=Cards.cardname = "{{{1}}}" AND Cards.chara LIKE "{{{2|}}}%"|format=list|default=}}|{{#cargo_query:tables=Cards,Card_Files|join on=Cards.number = Card_Files.number|fields=CONCAT('[[File:', Card_Files.icon1, "|link=", CONCAT('Cards/', Cards.chara, '/', Cards.cardname), '|{{{4|}}}]] ')|where=Cards.cardname = "{{{1}}}" AND Cards.chara LIKE "{{{2|}}}%"|format=list|default=}}}}</includeonly><noinclude>
  
 
<pre>
 
<pre>
Line 5: Line 5:
 
| (exact card name)
 
| (exact card name)
 
| (optional chara name - can be just first name)
 
| (optional chara name - can be just first name)
| (optional attribute - Co/Ac/Sr)
 
 
| (optional y = is prebloomed)
 
| (optional y = is prebloomed)
 +
| (optional image size in px eg. "50px")
 
}}
 
}}
 
</pre>
 
</pre>
Line 13: Line 13:
  
 
{{Item/CardIcon|Eternally Straying Encounter}} </br>
 
{{Item/CardIcon|Eternally Straying Encounter}} </br>
{{Item/CardIcon|MANKAI Birthday|Yuki}} is a card that needs the character name.
+
{{Item/CardIcon|MANKAI Birthday|Yuki}} is a card that needs the character name.</br>
{{Item/CardIcon|MANKAI☆Kaika Sengen|Tsumugi||y}} is a prebloomed card.
+
{{Item/CardIcon|MANKAI☆Kaika Sengen|Tsumugi|y}} is a prebloomed card.</br>
 +
{{Item/CardIcon|Eternally Straying Encounter|||75px}} has a changed image size
 
</noinclude>
 
</noinclude>

Revision as of 10:08, 20 September 2020


{{Item/CardIcon
| (exact card name)
| (optional chara name - can be just first name)
| (optional y = is prebloomed)
| (optional image size in px eg. "50px")
}}

Creates an card icon that links to card page. If you want to display rarity + character name, use Template:Item/Card.

(Eternally Straying Encounter) Tsumugi Tsukioka Action SSR Icon Unbloomed.png
(MANKAI Birthday) Yuki Rurikawa Comedy SSR Icon Unbloomed.png is a card that needs the character name.
(MANKAI☆Kaika Sengen) Tsumugi Tsukioka Action SSR++ Icon Bloomed.png is a prebloomed card.
(Eternally Straying Encounter) Tsumugi Tsukioka Action SSR Icon Unbloomed.png has a changed image size