Template:PkmnSprite: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Manual revert
 
(7 intermediate revisions by the same user not shown)
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) 
<syntaxhighlight lang="text">
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|48}}
{{pkmnSprite
 
  | Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png
Example 2 (icon + label)  
| Pikachu
{{pkmnSprite|Pixelmon-pokemon-025_pikachu-all-base-none-sprite.png|Pikachu|32|Pikachu}}
| 48
}}
</syntaxhighlight>
</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}}}|{{{3|32}}}px|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