Template:PkmnSprite: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
(Created page with "<noinclude> {{-start-}} '''pkmnSprite''' Renders a Pixelmon sprite (always shown at 32 px and with the “pixelated” class) that links to an arbitrary wiki page. * **1** – ''File name or path'' (everything after the “File:” prefix & including extension) e.g. `Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png` * **2** – ''Page title'' to link to (defaults to first parameter without “.png”) <syntaxhighlight lang="text"> {{pkmnSprite|Pixelmon-pokemo...")
 
No edit summary
Tag: Manual revert
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
{{-start-}}
'''pkmnSprite'''
'''pkmnSprite'''


Renders a Pixelmon sprite (always shown at 32 px and with the “pixelated” class)
Renders a Pixelmon sprite that links to a wiki page.
that links to an arbitrary wiki page.


* **1** – ''File name or path'' (everything after the “File:” prefix & including extension)   
;Parameters
   e.g. `Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png`
* '''1 = file''' (required) – file name or full path *after* “File:”
* **2** ''Page title'' to link to (defaults to first parameter without “.png”)
* '''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&nbsp;2


<syntaxhighlight lang="text">
Example 1 (icon only) 
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu}}
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|48}}
</syntaxhighlight>


{{-stop-}}
Example 2 (icon + label) 
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|32|Pikachu}}
</noinclude>
</noinclude>
<!-- ========================================================= -->
<!-- ========================================================= -->
 
<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>
[[File:{{{1}}}|32px|class=pixelated|link={{{2|{{#titleparts:{{{1}}}|1}}}}}]]

Latest revision as of 06:05, 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