Template:PkmnSprite: Difference between revisions
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. | ||
* | ;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 | 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}}}}}]] [[{{{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