Difference between revisions of "Template:Set-Details-Compact"

From mtgpq wiki
Jump to: navigation, search
Line 19: Line 19:
  
 
== Example ==
 
== Example ==
This shorthand
+
This shorthand within a table
 
<pre><nowiki>
 
<pre><nowiki>
 
{{Set-Details-Compact
 
{{Set-Details-Compact
Line 38: Line 38:
  
 
Produces:
 
Produces:
 +
{| class="wikitable"
 
{{Set-Details-Compact
 
{{Set-Details-Compact
 
|id = 13
 
|id = 13
Line 53: Line 54:
 
|cards_c = 60
 
|cards_c = 60
 
}}
 
}}
</noinclude><includeonly>{| class="wikitable"
+
|}
|-
+
</noinclude><includeonly>|-
! style="text-align: left;" | {{nowrap|[[File:{{{abbr}}}_Symbol.png|x24px|{{{title}}} icon]] &nbsp; [[{{{name}}}]] ({{{abbr}}})}}
+
! rowspan="2" style="text-align: left;" | {{nowrap|[[File:{{{abbr}}}_Symbol.png|x24px|{{{title}}} icon]] &nbsp; [[{{{name}}}]] ({{{abbr}}})}}
| colspan="2" | '''Cards:''' [https://mtgpq.info/cards/search?sets={{{id}}} {{{cards_total}}}] &nbsp;<small><!--
+
<div style="text-align: right; direction: ltr; margin-left: 1em;"><small>''[{{{notes}}} {{{date}}} (version {{{version}}})]''</small></div>
 +
| '''Cards:''' [https://mtgpq.info/cards/search?sets={{{id}}} {{{cards_total}}}] &nbsp;<small><!--
 
  -->C:{{#ifeq: {{{cards_c}}}|0|0|[https://mtgpq.info/cards/search?rarities=5&sets={{{id}}} {{{cards_c}}}]}} <!--
 
  -->C:{{#ifeq: {{{cards_c}}}|0|0|[https://mtgpq.info/cards/search?rarities=5&sets={{{id}}} {{{cards_c}}}]}} <!--
 
  -->U:{{#ifeq: {{{cards_u}}}|0|0|[https://mtgpq.info/cards/search?rarities=4&sets={{{id}}} {{{cards_u}}}]}} <!--
 
  -->U:{{#ifeq: {{{cards_u}}}|0|0|[https://mtgpq.info/cards/search?rarities=4&sets={{{id}}} {{{cards_u}}}]}} <!--
Line 63: Line 65:
 
-->MP:{{#ifeq: {{{cards_mp}}}|0|0|[https://mtgpq.info/cards/search?rarities=1&sets={{{id}}} {{{cards_mp}}}]}}</small>
 
-->MP:{{#ifeq: {{{cards_mp}}}|0|0|[https://mtgpq.info/cards/search?rarities=1&sets={{{id}}} {{{cards_mp}}}]}}</small>
 
|-
 
|-
| colspan="2" | [{{{notes}}} {{{date}}} (version {{{version}}})]
 
 
| {{#if: {{#explode:{{{mechanics}}}|,|0}} | '''New mechanics:''' <small>[[Abilities#{{#explode:{{{mechanics}}}|,|0}}|{{#explode:{{{mechanics}}}|,|0}}]] <!--
 
| {{#if: {{#explode:{{{mechanics}}}|,|0}} | '''New mechanics:''' <small>[[Abilities#{{#explode:{{{mechanics}}}|,|0}}|{{#explode:{{{mechanics}}}|,|0}}]] <!--
 
-->{{#if: {{#explode:{{{mechanics}}}|,|1}} | [[Abilities#{{#explode:{{{mechanics}}}|,|1}}|{{#explode:{{{mechanics}}}|,|1}}]] | }} <!--
 
-->{{#if: {{#explode:{{{mechanics}}}|,|1}} | [[Abilities#{{#explode:{{{mechanics}}}|,|1}}|{{#explode:{{{mechanics}}}|,|1}}]] | }} <!--
Line 75: Line 76:
 
-->{{#if: {{#explode:{{{mechanics}}}|,|9}} | [[Abilities#{{#explode:{{{mechanics}}}|,|9}}|{{#explode:{{{mechanics}}}|,|9}}]] | }} <!--
 
-->{{#if: {{#explode:{{{mechanics}}}|,|9}} | [[Abilities#{{#explode:{{{mechanics}}}|,|9}}|{{#explode:{{{mechanics}}}|,|9}}]] | }} <!--
 
-->| <small>''(No new mechanics added)''
 
-->| <small>''(No new mechanics added)''
}}</small>
+
}}</small></includeonly>
|}</includeonly>
 

Revision as of 07:54, 30 December 2018

Shorthand for creating a miniature table with set details for a given Set.

Parameters are:

  • {{{id}}}: The set's ID on mtgpq.info (e.g. 13)
  • {{{name}}}: The name of the set (e.g. Dominaria)
  • {{{abbr}}}: The abbreviation used for the set (e.g. DOM)
  • {{{date}}}: The month/year the set was released (e.g. May 2018)
  • {{{version}}}: The version of the app the set released in (e.g. 2.7 for DOM)
  • {{{notes}}}: Release notes for the version
  • {{{mechanics}}}: Comma separated list of zero or more mechanics (e.g. "Saga, Historic, Leader")
  • {{{cards_total}}}: The total number of cards in the set (e.g. 211)
  • {{{cards_mp}}}: The number of masterpiece cards in the set (e.g. 10)
  • {{{cards_m}}}: The number of mythic cards in the set (e.g. 29)
  • {{{cards_r}}}: The number of rare cards in the set (e.g. 48)
  • {{{cards_u}}}: The number of uncommon cards in the set (e.g. 64)
  • {{{cards_c}}}: The number of common cards in the set (e.g. 60)

A file named {{{abbr}}}_Symbol.png is assumed to exist and is used for the set icon.

Example

This shorthand within a table

{{Set-Details-Compact
|id = 13
|name = Dominaria
|abbr = DOM
|date = May 2018
|version = 2.7
|notes = https://forums.d3go.com/discussion/72742/2-7-release-notes-updated-5-23-18
|mechanics = Saga,Historic,Leader
|cards_total = 211
|cards_mp = 10
|cards_m = 29
|cards_r = 48
|cards_u = 64
|cards_c = 60
}}

Produces: