Template:Card: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Yandere-sliver
>Tuamir
mNo edit summary
 
(41 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#tag:c|{{{1}}}|set={{#if:{{{2|}}}|{{{3|{{Code by set|{{{2|}}}}}}}}|{{#if:{{{3|}}}|{{{3|}}}}}}}|title={{{1}}}}}{{#if:{{{2|}}}|&#32;(''{{#if:{{{3|}}}|[[{{{2|}}}]]|[[{{Set by code|{{Code by set|{{{2|}}}}}}}|{{{2|}}}]]}}'')}}</includeonly><noinclude>==Usage==
<includeonly>{{#tag:c<!-- Card tag aka <c>
This template can be used within another template to link to a card passed as a parameter.
Content: -->|{{{1}}}<!-- Card name (param1)
 
  Attr: -->|set={{#if:{{{2|}}}|{{{3|{{code by set|{{{2|}}}}}}}}<!-- Uses set code (param3) if possible, otherwise tries to get set code from set name (param2)
:<code><nowiki>{{cardlink|card name|edition|scryfall set code}}</nowiki></code>
                            -->|{{#if:{{{3|}}}|{{{3|}}}}}<!-- Just uses set code if no set name
 
              -->}}<!--
===Parameters===
  Attr: -->|number={{{#|}}}<!--
*<code>{{{1}}}</code>: the official card name.
  Attr: -->|title={{{title|{{{1}}}}}}<!-- Uses custom title/displayname if provided, otherwise just card name
*<code>{{{2}}}</code>: Optional - the edition to be used. Also shown after the card name. If left blank, there will be no following link to the article.
  Attr: -->|artist={{{artist|}}}<!--
*<code>{{{3}}}</code>: Optional - [https://scryfall.com Scryfall] set code. Only needed for special releases like media Inserts of FNM promos. Use third parameter while leaving second parameter blank to avoid having the edition shown in parentheses after the card name.
-->}}<!-- end c tag
 
begin set & collector number note if set name is provided
===Examples===
-->{{#if:{{{2|{{{3|}}}}}}|&#32;(''{{#if:{{{3|}}}|[[{{{2|{{set by code|{{{3|}}}}}}}}]]<!-- if set code provided, link to set by name,
# <nowiki>{{cardlink|Jace Beleren}}</nowiki>
                                                          otherwise link set name normalized via set code (generating error categories if needed)
#* {{cardlink|Jace Beleren}}
                                    -->|{{#if:{{{2|}}}|[[{{{{{set by code|{{code by set|{{{2|}}}}}}}|{{{2|}}}}}}]]}}<!-- Just uses set name if no set code
# <nowiki>{{cardlink|Jace Beleren|Lorwyn}}</nowiki>
                              -->}}<!--
#* {{cardlink|Jace Beleren|Lorwyn}}
                      -->{{#if:{{{#|}}}|, #{{{#}}}}}<!--
# <nowiki>{{cardlink|Jace Beleren|Promo|PDD2}}</nowiki>
                    -->'')<!--
#* {{cardlink|Jace Beleren|Promo|PDD2}}
-->}}</includeonly><noinclude>{{Documentation}}
# <nowiki>{{cardlink|Jace Beleren||PBOK}}</nowiki>
[[Category:Magic product templates]]</noinclude>
#* {{cardlink|Jace Beleren||PBOK}}
 
[[Category:Magic product templates]]

Latest revision as of 00:55, 27 April 2023

 Template Documentation[view | edit | history | purge]
This is a template documentation subpage for Template:Card.
It contains usage information, categories, interlanguage links and other content that is not part of the original template page.

This template can be used within another template to link to a card passed as a parameter.

{{card|card name|set name|scryfall set code|#=collector number}}

Creates an external link to a specific card on Scryfall.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Card Name1

The name of the card

Example
Grizzly Bears; Daxos, With Eyes Open; Opt
Stringrequired
Set Name2

The name of the set the card appeared in. If omitted, the latest print is used.

Example
Limited Edition; Shadows over Innistrad; Theros: Beyond Death; Magic 2015
Stringsuggested
Scryfall Set Code3

The set's code as it appears on Scryfall

Example
LEA, SOI, TAKH, PKTK
Stringoptional
Display Nametitle

Override the card name with custom text; useful for Godzilla cards

Example
Godzilla, King of the Monsters; Ὁ πλανώμενος Φελδδαγρίφος
Stringoptional
Collector Number#

The collector number as it appears on Scryfall; usefull for choosing a card with specific art

Example
13, 41f
Stringoptional

Examples

  1. {{card|Jace Beleren}}
  2. {{card|Jace Beleren|Lorwyn}}
  3. {{card|Jace Beleren|Promo|DD2|#=1★}}
  4. {{card|Jace Beleren||PBOOK}}
  5. {{card|Golgari Guildgate|Guilds of Ravnica|#=248}}
    {{card|Golgari Guildgate|Guilds of Ravnica|#=249}}
  6. {{card|Black Lotus|title=a lotus which is black}}
  7. {{card|Urza's Tower||ATQ|#=85b}}
The above documentation is transcluded from Template:Card/doc. (edit | history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories and interwikis to the /doc subpage. Subpages of this template.