Difference between revisions of "Template:Deck List Row"

From mtgpq wiki
Jump to: navigation, search
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
 +
==Usage==
 
A row in [[Template:Deck_List]].
 
A row in [[Template:Deck_List]].
  
== Parameters ==
+
The only parameter is the card name.
# A card name
 
# The card type: creature, spell, or support.  (These keywords are case-insensitive.)
 
  
== Example ==
+
==Example==
This code:
+
 
 +
This mark-up:
 
<pre><nowiki>
 
<pre><nowiki>
{{Deck List Row|Champion of Wits|creature}}
+
{{Deck List Row|Zetalpa, Primal Dawn}}
 
</nowiki></pre>
 
</nowiki></pre>
  
Produces this content:
+
Produces:
  
{{Deck List Row|Fateful Showdown|creature}}
+
{{Deck List Row|Zetalpa, Primal Dawn}}
  
 
</noinclude><includeonly>|-
 
</noinclude><includeonly>|-
 
+
{{#ifexist: Template:Card data: {{{1}}}|
|{{#ifeq:{{lc:{{{2}}}}}|creature|[[File:Creature-Icon.png|{{{size|x16px}}}]]|<!--
+
{{!}} [[{{#explode:{{Card data|{{{1}}}}}|{{!}}|0}}]]            <!--Name-->
-->{{#ifeq:{{lc:{{{2}}}}}|spell|[[File:Spell-Icon.png|{{{size|x16px}}}]]|<!--
+
{{!}} {{{{#explode:{{Card data|{{{1}}}}}|{{!}}|5}}s}}<!--            Type  with (P/T) or (shields)
-->{{#ifeq:{{lc:{{{2}}}}}|support|[[File:Support-Icon.png|{{{size|x16px}}}]]}}}}}}<!--
+
-->{{#ifeq:{{#explode:{{Card data|{{{1}}}}}|{{!}}|5}}|Creature| &nbsp;({{#explode:{{Card data|{{{1}}}}}|{{!}}|7}})|<!--
--> &nbsp;[[{{{1}}}]]</includeonly>
+
-->{{#ifeq:{{#explode:{{Card data|{{{1}}}}}|{{!}}|5}}|Support| &nbsp;({{#explode:{{Card data|{{{1}}}}}|{{!}}|8}})}}}}
 +
{{!}} {{#explode:{{Card data|{{{1}}}}}|{{!}}|4}}                <!--Cost-->
 +
{{!}} {{Color Icons|{{#explode:{{Card data|{{{1}}}}}|{{!}}|3}}}} <!--Color-->
 +
{{!}} {{SetSymbol|{{#explode:{{Card data|{{{1}}}}}|{{!}}|1}}}} <small>[[{{#explode:{{Card data|{{{1}}}}}|{{!}}|1}}]]</small>  <!--Set-->
 +
{{!}} {{Rarity|{{#explode:{{Card data|{{{1}}}}}|{{!}}|2}}}}      <!--Rarity-->
 +
|{{!}} {{{1}}}
 +
{{!}} colspan="5" {{!}} ''Missing card data''}}</includeonly>

Revision as of 08:31, 13 February 2019

Usage

A row in Template:Deck_List.

The only parameter is the card name.

Example

This mark-up:

{{Deck List Row|Zetalpa, Primal Dawn}}

Produces:

  |- | Zetalpa, Primal Dawn | Creatures (4/8) | 19 | White | Mythic | Rivals of Ixalan RIX Legacy