Template:Scryfall search: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Jerodast
m (improve documentation & formatting slightly. I think the second #if:{{{2|}}} could be structured more like the first one but out of an excess of caution I'll leave it alone.)
>Jerodast
(I don't really know why there was an #if:{{{1|}}} here in the first place, but as long as there is it might as well produce an error if missing.)
Line 15: Line 15:
           -->|{{#replace:{{{1|}}}|]|&#93;}}<!--
           -->|{{#replace:{{{1|}}}|]|&#93;}}<!--
           -->|{{{enclose|"}}}{{#replace:{{{1|}}}|]|&#93;}}{{{enclose|"}}}}}<!--
           -->|{{{enclose|"}}}{{#replace:{{{1|}}}|]|&#93;}}{{{enclose|"}}}}}<!--
       -->|{{{1|}}}<!--
       -->|{{{1|}}}<!-- else plain search text display (no search type specified)
     -->}}<!--
     -->}}<!--
   -->}}<!--
   -->}}<!--
-->]}}{{#if:{{{date|}}}|. Retrieved from Scryfall on {{{date|}}}.}}</includeonly><noinclude>{{Documentation}}
-->]<!--
-->|Template error: Scryfall search missing search term.[[Category:Pages with template calls missing required parameters]]<!--
-->}}<!--
-->{{#if:{{{date|}}}|. Retrieved from Scryfall on {{{date|}}}.}}</includeonly><noinclude>{{Documentation}}
[[Category:Magic product templates]]</noinclude>
[[Category:Magic product templates]]</noinclude>

Revision as of 11:32, 3 April 2023

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

Parameters

  • {{{1}}}: Search phrase. Required.
  • {{{2}}}: Search type (is, watermark, lore, fulloracle, artist, etc. Use "raw" if you want search exactly the search phrase.)
  • {{{enclose}}}: Defaults to ", can be set to / to enable regular expressions
  • {{{display}}}: If another thing then the search phrase should be displayed
  • {{{color}}}: Choose the exact color to be selected
  • {{{add}}}: Make the search more specific
  • {{{date}}}: The date of the search

Other usage notes

  • Use {{!}} to stand in for a pipe character | for use in regular expression search.
  • Use {{=}} to stand in for an equals sign = for use in regular expression search or with numerical fields.
  • Pages using this template display warnings and appear on Category:Pages with template calls missing required parameters if they do not provide the required {{{1}}} parameter.

Examples

  • {{Scryfall search|Circle of Protection}} - Circle of Protection
  • {{Scryfall search|Circle of Protection|add=-is:funny}} - Circle of Protection
  • {{Scryfall search|Dimir|watermark}} - watermark:"Dimir"
  • {{Scryfall search|Dimir|watermark|display=[Just Dimir]}} - [Just Dimir]
  • {{Scryfall search|manland|is}} - is:manland
  • {{Scryfall search|Awaken.*—|oracle|enclose=/}} - oracle:/Awaken.*—/
  • {{Scryfall search|(?<!when(ever)? ([^.]* or )?a(n{{!}}nother)? {{!}}when enchanted )(owner{{!}}controller{{!}}player{{!}}opponent{{!}}they)s? ((?!can't{{!}}don't)[\w']+ )*loses? the game|oracle|enclose=/|display=Cards that make someone other than "you" lose the game}} - <!when(ever)?+( [^.*+or+)?a(n|nother)?+|when+enchanted+)(owner|controller|player|opponent|they)s?+((?!can't|don't)[\w']++)*loses?+the+game%2F Cards that make someone other than "you" lose the game]
  • {{Scryfall search|is:dfc date>{{=}}DOM -is:extra rarity<R o:/(?!~)[\/+-]/|raw}} - >=DOM+-is:extra+rarity<R+o:/(?!~) [\/+-/%22 raw:"is:dfc date>=DOM -is:extra rarity<R o:/(?!~)[\/+-]/"]
The above documentation is transcluded from Template:Scryfall search/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.