Template:PkmnSprite: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:
Renders a Pixelmon sprite that links to a wiki page.
Renders a Pixelmon sprite that links to a wiki page.


* **1 = file** – file name or path (after “File:” prefix) 
;Parameters
* **2 = page** – target page to link to (defaults to file-name without “.png”)
* '''1 = file''' (required) – file name or full path *after* “File:”
* **3 = size** *optional* thumbnail size in **px** (default **32**)
* '''2 = page''' (required) – target page to link to
  (defaults to the file name without “.png”)
* '''3 = size''' (optional) – thumbnail width in '''px''' (default **32**)
* '''4 = text''' (optional) – inline label shown to the right of the sprite; 
  links to the same page as parameter 2


Example:
Example 1 (icon only) 
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|48}}
<code>{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|48}}</code>
 
Example 2 (icon + label) 
<code>{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|32|Pikachu}}</code>
</noinclude>
</noinclude>
<!-- ========================================================= -->
<!-- ========================================================= -->
[[File:{{{1}}}|{{{3|32}}}px|class=pixelated|link={{{2|{{#titleparts:{{{1}}}|1}}}}}]]
<includeonly>{{#if: {{{4|}}} |[[File:{{{1}}}|{{{3|32}}}px|class=pixelated|link={{{2|{{#titleparts:{{{1}}}|1}}}}}]]&#8202;[[{{{2|{{#titleparts:{{{1}}}|1}}}}}|{{{4}}}]]|[[File:{{{1}}}|{{{3|32}}}px|class=pixelated|link={{{2|{{#titleparts:{{{1}}}|1}}}}}]]}}<!----></includeonly>

Revision as of 04:48, 2 June 2025

pkmnSprite

Renders a Pixelmon sprite that links to a wiki page.

Parameters
  • 1 = file (required) – file name or full path *after* “File:”
  • 2 = page (required) – target page to link to
 (defaults to the file name without “.png”)
  • 3 = size (optional) – thumbnail width in px (default **32**)
  • 4 = text (optional) – inline label shown to the right of the sprite;
 links to the same page as parameter 2

Example 1 (icon only)

Example 2 (icon + label) Pikachu