Template:Scryfall search: Difference between revisions

From MTG Wiki
Jump to navigation Jump to search
>Yandere-sliver
(documentation and formating)
>Yandere-sliver
No edit summary
Line 1: Line 1:
<includeonly>{{#if:{{{1|}}}|[https://scryfall.com/search?q=<!--
<includeonly>{{#if:{{{1|}}}|[https://scryfall.com/search?q=<!--
   -->{{#if:{{{2|}}}|{{{2|}}}%3A}}<!-- adds the search type if given
   -->{{#if:{{{2|}}}|{{{2|}}}%3A}}<!-- adds the search type if given
   -->{{#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<!--
     -->|%22{{#replace:{{{1|}}}| |+}}%22<!--
   -->}}<!--  
   -->}}<!--  
   -->{{#if:{{{add|}}}|+{{urlencode:{{{add|}}}|PATH}}}} <!-- additional search options that will automatically be url encoded.
   -->{{#if:{{{add|}}}|+{{urlencode:{{{add|}}}|PATH}}}} <!-- additional search options that will automatically be url encoded.
   -->{{#if:{{{display|}}}<!--  
   -->{{#if:{{{display|}}}<!-- if you want to display something different then the search phrase
     -->|{{#replace:{{{display|}}}|]|&#93;}}<!-- if you want to display something different then the search phrase, 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.
     -->|{{#if:{{{2|}}}<!--
     -->|{{#if:{{{2|}}}<!--
       -->|{{{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;}}"}}<!--
         -->|"{{#replace:{{{1|}}}|]|&#93;}}"}}<!--

Revision as of 11:39, 19 May 2019

Parameters

  • {{{1}}}: Search phrase
  • {{{2}}}: Search type (is, watermark, lore, fulloracle, artist, etc.)
  • {{{display}}}: If another thing then the search phrase should be displayed
  • {{{add}}}: Make the search more specific.

Examples