Difference between revisions of "Template:Card URL"

From mtgpq wiki
Jump to: navigation, search
(Created page with "<noinclude> == Usage == Converts a card name to a link to the card on mtgpq.info. The only parameter is the name of the card. == Example == The following shorthand (contain...")
 
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
 
Converts a card name to a link to the card on mtgpq.info.
 
Converts a card name to a link to the card on mtgpq.info.
  
The only parameter is the name of the card.
+
The first parameter is the name of the card.
 +
The optional "nolink" parameter, if set, produces a URL as plain text rather than a link.
  
 
== Example ==
 
== Example ==
Line 10: Line 11:
 
<pre><nowiki>
 
<pre><nowiki>
 
{{Card URL|Abbot of Keral Keep}}
 
{{Card URL|Abbot of Keral Keep}}
 +
{{Card URL|Ugin, the Ineffable}}
 +
{{Card URL|Crush of Tentacles|nolink=1}}
 
</nowiki></pre>
 
</nowiki></pre>
  
Line 16: Line 19:
 
{{Card URL|Abbot of Keral Keep}}
 
{{Card URL|Abbot of Keral Keep}}
  
</noinclude><includeonly>[https://mtgpq.info/cards/{{#replace:{{#replace:{{#replace:{{#if:{{#pos:{{Card data: {{{1}}}|1}}|/}}|{{#explode:{{Card data: {{{1}}}|1}}|/|0}}|{{Card data: {{{1}}}|1}}}}|'|}}|,|}}| |}}{{#if:{{#pos:{{Card data: {{{1}}}|7}}|Saga}}|I}} {{#if:{{#pos:{{Card data: {{{1}}}|1}}|/}}|{{#explode:{{Card data: {{{1}}}|1}}|/|0}}|{{Card data: {{{1}}}|1}}}}]</includeonly>
+
{{Card URL|Ugin, the Ineffable}}
 +
 
 +
{{Card URL|Crush of Tentacles|nolink=1}}
 +
 
 +
</noinclude><includeonly>{{#if:{{{nolink|}}}||[}}https://mtgpq.info/cards/{{#replace:{{#replace:{{#replace:{{#replace:{{#if:{{#pos:{{Card data: {{{1}}}|1}}|/}}|{{#explode:{{Card data: {{{1}}}|1}}|/|0}}|{{Card data: {{{1}}}|1}}}}|'|}}|,|}}| |}}|-|}}{{#if:{{#pos:{{Card data: {{{1}}}|7}}|Saga}}|I}}{{#if:{{#pos:{{Card data: {{{1}}}|7}}|Vanguard}}|%2528ability1%2529}} {{#if:{{{nolink|}}}||{{{1}}}]}}</includeonly>

Latest revision as of 11:29, 27 April 2020

Usage

Converts a card name to a link to the card on mtgpq.info.

The first parameter is the name of the card. The optional "nolink" parameter, if set, produces a URL as plain text rather than a link.

Example

The following shorthand (containing the card panel in a table):

{{Card URL|Abbot of Keral Keep}}
{{Card URL|Ugin, the Ineffable}}
{{Card URL|Crush of Tentacles|nolink=1}}

Produces:

Abbot of Keral Keep

Ugin, the Ineffable

https://mtgpq.info/cards/CrushofTentacles