MTG Wiki
(Enclose now can be set to / to enable regular expressions)
 
(6 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
-->{{#ifeq:{{{2|}}}|is<!-- if the search type is "is", skip the quotations
 
-->{{#ifeq:{{{2|}}}|is<!-- if the search type is "is", skip the quotations
 
-->|{{#replace:{{{1|}}}| |+}}<!--
 
-->|{{#replace:{{{1|}}}| |+}}<!--
-->|%22{{#replace:{{{1|}}}| |+}}%22<!--
+
-->|{{urlencode:{{{enclose|"}}}}}{{#replace:{{{1|}}}| |+}}{{urlencode:{{{enclose|"}}}}}<!--
-->}}<!--
+
-->}}<!--
-->{{#if:{{{add|}}}|+{{urlencode:{{{add|}}}|PATH}}}} <!-- additional search options that will automatically be url encoded.
+
-->{{#if:{{{color|}}}|+color%3D{{{color|}}}}}<!-- additional exact color
  +
-->{{#if:{{{add|}}}|+{{urlencode:{{{add|}}}|PATH}}}} <!-- additional search options that automatically will be url encoded.
 
-->{{#if:{{{display|}}}<!-- if you want to display something different then the search phrase
 
-->{{#if:{{{display|}}}<!-- if you want to display something different then the search phrase
 
-->|{{#replace:{{{display|}}}|]|&#93;}}<!-- closing bracket is escaped do avoid issue with the wiki formatting.
 
-->|{{#replace:{{{display|}}}|]|&#93;}}<!-- closing bracket is escaped do avoid issue with the wiki formatting.
Line 11: Line 12:
 
-->|{{{2|}}}:{{#ifeq:{{{2|}}}|is<!-- again if the search type is "is", skip the quotations
 
-->|{{{2|}}}:{{#ifeq:{{{2|}}}|is<!-- again if the search type is "is", skip the quotations
 
-->|{{#replace:{{{1|}}}|]|&#93;}}<!--
 
-->|{{#replace:{{{1|}}}|]|&#93;}}<!--
-->|"{{#replace:{{{1|}}}|]|&#93;}}"}}<!--
+
-->|{{{enclose|"}}}{{#replace:{{{1|}}}|]|&#93;}}{{{enclose|"}}}}}<!--
 
-->|{{{1|}}}<!--
 
-->|{{{1|}}}<!--
 
-->}}<!--
 
-->}}<!--
 
-->}}<!--
 
-->}}<!--
-->]}}</includeonly><noinclude>
+
-->]}}{{#if:{{{date|}}}|. Retrieved from Scryfall on {{{date|}}}.}}</includeonly><noinclude>{{Documentation}}
==Parameters==
 
*<code>{{{1}}}</code>: Search phrase
 
*<code>{{{2}}}</code>: Search type (is, watermark, lore, fulloracle, artist, etc.)
 
*<code>{{{display}}}</code>: If another thing then the search phrase should be displayed
 
*<code>{{{add}}}</code>: Make the search more specific.
 
==Examples==
 
*<nowiki>{{Scryfall search|Circle of Protection}}</nowiki> - {{Scryfall search|Circle of Protection}}
 
*<nowiki>{{Scryfall search|Circle of Protection|add=-is:funny}}</nowiki> - {{Scryfall search|Circle of Protection|add=-is:funny}}
 
*<nowiki>{{Scryfall search|Dimir|watermark}}</nowiki> - {{Scryfall search|Dimir|watermark}}
 
*<nowiki>{{Scryfall search|Dimir|watermark|display=[Just Dimir]}}</nowiki> - {{Scryfall search|Dimir|watermark|display=[Just Dimir]}}
 
*<nowiki>{{Scryfall search|manland|is}}</nowiki> - {{Scryfall search|manland|is}}
 
 
 
[[Category:Magic product templates]]</noinclude>
 
[[Category:Magic product templates]]</noinclude>

Latest revision as of 15:42, 27 June 2020

Template documentation[view] [edit] [history] [purge]

Parameters

  • {{{1}}}: Search phrase
  • {{{2}}}: Search type (is, watermark, lore, fulloracle, artist, etc.)
  • {{{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

Examples