Template:PixelImage: Difference between revisions

From I-Pixelmon
Jump to navigation Jump to search
No edit summary
No edit summary
Tag: Reverted
Line 1: Line 1:
<!-- =================  Template:PixelImage  ================= --><includeonly>{{#if: {{{display|}}}| {{#switch: {{{wiki|}}}| minecraft = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated|link=https://minecraft.fandom.com/wiki/{{#replace:{{{display}}}| | _}}]] [https://minecraft.fandom.com/wiki/{{#replace:{{{display}}}| | _}} {{{display}}}]| pixelmon  = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated|link={{#replace:{{{display}}}| | _}}]] [[{{{display}}}]]| #default  = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated]] {{{display}}}}}| [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated]]}}</includeonly>
<!-- =================  Template:PixelImage  ================= -->
<noinclude>{{Documentation}}<!--
<includeonly>{{#if: {{{display|}}}|
{{#switch: {{{wiki|}}}
| minecraft = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated|link=https://minecraft.fandom.com/wiki/{{#replace:{{{display}}}| | _}}]][https://minecraft.fandom.com/wiki/{{#replace:{{{display}}}| | _}} {{{display}}}]
| pixelmon  = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated|link={{#replace:{{{display}}}| | _}}]][[{{{display}}}]]
| #default  = [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated]]{{{display}}}
}}
| [[File:{{{filename}}}|{{{size|24}}}px|class=pixelated]]
}}<!--
--></includeonly>
--></includeonly>
<noinclude>{{Documentation}}</noinclude>
<noinclude>
<noinclude>
== Usage ==
== Usage ==

Revision as of 06:41, 1 June 2025


Template:Documentation

Usage

{{PixelImage
|filename = MyImage.png        <!-- required -->
|display  = Diamond Pickaxe    <!-- optional -->
|size     = 32                 <!-- optional, defaults 24 -->
|wiki     = minecraft          <!-- optional: minecraft / pixelmon / ”” -->
}}
Parameters
  • filename – **required**. Exact file name, including extension.
  • display – optional. Text to show next to the icon.
 If omitted, only the icon is shown and it is **not** a link.
  • size – optional. Width (px). Defaults to 24 px.
  • wiki – optional.
 **minecraft** → icon + text link to Minecraft Wiki.  
 **pixelmon**  → icon + text link internally.  
 anything else → no links.

Examples


→ 24 px icon, no link, no text.


 Golden Axe

test text

→ icon + text “Golden Axe”, no links.


Golden Axe


→ 32 px icon + text, both link to https://minecraft.wiki/w/Golden_Axe


Golden Axe


→ icon + text “Golden Axe”, internal link.