Open main menu

mtgpq wiki β

Changes

Template:Card gallery

1,960 bytes added, 11:39, 27 April 2020
Created page with "<noinclude> == Usage == The Card gallery template displays a set of cards as card images in a dynamic layout. Any card in the gallery can be clicked to open a modal popup wit..."
<noinclude>
== Usage ==
The Card gallery template displays a set of cards as card images in a dynamic layout. Any card in the gallery can be clicked to open a modal popup with a larger view of the cards in the gallery and navigation between cards.

== Parameters ==
* id: The ID of the card list. This must be unique for each card list on any one page.
* (optional) width: The width of each card in pixels in the non-modal (embedded) view.
* (up to 10 unlabeled parameters): The names of cards in the gallery.

== Example ==

The following shorthand:
<pre><nowiki>
{{Card gallery
|id = 1.1
|Champion of Wits
|Ominous Sphinx
|The Locust God
|Unesh, Criosphinx Sovereign
|Vizier of the Anointed
|Endless Sands
|Imaginary Threats
|Kefnet's Last Word
|Riddleform
|Swarm Intelligence
}}
</nowiki></pre>

Produces:
{{Card gallery
|id = 1.1
|Champion of Wits
|Ominous Sphinx
|The Locust God
|Unesh, Criosphinx Sovereign
|Vizier of the Anointed
|Endless Sands
|Imaginary Threats
|Kefnet's Last Word
|Riddleform
|Swarm Intelligence
}}

</noinclude><includeonly>{{#if:{{{1|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{1}}}|{{Card image|{{{1}}}}}}}}}
{{#if:{{{2|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{2}}}|{{Card image|{{{2}}}}}}}}}
{{#if:{{{3|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{3}}}|{{Card image|{{{3}}}}}}}}}
{{#if:{{{4|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{4}}}|{{Card image|{{{4}}}}}}}}}
{{#if:{{{5|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{5}}}|{{Card image|{{{5}}}}}}}}}
{{#if:{{{6|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{6}}}|{{Card image|{{{6}}}}}}}}}
{{#if:{{{7|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{7}}}|{{Card image|{{{7}}}}}}}}}
{{#if:{{{8|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{8}}}|{{Card image|{{{8}}}}}}}}}
{{#if:{{{9|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{9}}}|{{Card image|{{{9}}}}}}}}}
{{#if:{{{10|}}}|{{#hsimg:{{{id|no_id}}}|{{{width|50}}}|{{{10}}}|{{Card image|{{{10}}}}}}}}}</includeonly>