Template:PM item: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
mNo edit summary
mNo edit summary
 
(21 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{
<includeonly>{{#invoke:PM item|link
  #vardefine: game | {{{game|PM}}}
|game{{#ifeq:{{{game|}}}|{{{game}}}||NULL}}={{{game}}}
}}{{
|1{{#ifeq:{{{1|}}}|{{{1}}}||NULL}}={{{1}}}
  #vardefine: item | {{{2|{{{1}}}}}}
|2{{#ifeq:{{{2|}}}|{{{2}}}||NULL}}={{{2}}}
}}{{
|item{{#ifeq:{{{item|}}}|{{{item}}}||NULL}}={{{item}}}
  #vardefine: link | {{{link|{{{1}}}}}}
|size{{#ifeq:{{{size|}}}|{{{size}}}||NULL}}={{{size}}}
}}{{
|right{{#ifeq:{{{right|}}}|{{{right}}}||NULL}}={{{right}}}
  #vardefine: image-prefix | {{
|link{{#ifeq:{{{link|}}}|{{{link}}}||NULL}}={{{link}}}
    #switch: {{#var:game}}
|text{{#ifeq:{{{text|}}}|{{{text}}}||NULL}}={{{text}}}
    | PM      = PaperMario Items&#32;
|color{{#ifeq:{{{color|}}}|{{{color}}}||NULL}}={{{color}}}
    | #default =
|wikitext{{#ifeq:{{{wikitext|}}}|{{{wikitext}}}||NULL}}={{{wikitext}}}
  }}
|sep{{#ifeq:{{{sep|}}}|{{{sep}}}||NULL}}={{{sep}}}
}}{{
}}</includeonly><noinclude>
  #vardefine: image-suffix | {{
This template creates a page link related to ''[[Paper Mario]]'' with an associated item image on the left side.
    #switch: {{#var:game}}
    | PM      =
    | PMTOK    = &#32;PMTOK icon
    | #default = &#32;{{#var:game}}
  }}
}}{{
  #vardefine: image-base | {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{item|{{#var:item}}}}}|×|x}}|.|}}|,|}}|'|}}|"|}}|?|}}|!|}}
}}{{
  #vardefine: image-base | {{
    #switch: {{#var:game}}
    | PM      = {{#replace:{{#var:image-base}}| |}}
    | PMTOK    = {{
      #switch: {{#var:image-base}}
      | Spring of Rainbows - VIP = Spring of Rainbows VIP
      | #default = {{#var:image-base}}
    }}
    | #default = {{#var:image-base}}
  }}
}}{{
  #vardefine: image | [[File:{{#var:image-prefix}}{{#var:image-base}}{{#var:image-suffix}}.png|{{{size|{{
    #switch: {{#var:game}}
    | TTYD    = 25x25px
    | PMTOK    = 50x50px
    | #default = &nbsp;
  }}}}}|link={{#var:link}}]]
}}{{
  #vardefine: text | {{{text|{{
    #if: {{{color|}}}
    | {{color-link-piped|{{#var:link}}|{{{color}}}|{{#var:item}}}}
    | [[{{#var:link}}|{{#var:item}}]]
  }}}}}
}}{{nowrap|{{
  #if: {{{right|}}}
  | {{#var:text}}{{{sep| }}}{{#var:image}}
  | {{#var:image}}{{{sep| }}}{{#var:text}}
}}}}</includeonly><noinclude>
=== Parameters ===
* <code>{{{1}}}</code>
* <code>{{{2}}}</code>
* <code>{{{sep}}}</code>
* <code>{{{text}}}</code>
* <code>{{{item}}}</code>
* <code>{{{link}}}</code>
* <code>{{{color}}}</code>
* <code>{{{right}}}</code>
* <code>{{{size}}}</code>
* <code>{{{game}}}</code>


=== Usage ===
{{/parameters|all=1}}
<pre>
{{PM item|Spaghetti}}
</pre>


{{PM item|Spaghetti}}
==Examples==
{| class="wikitable"
! Code
! Result
|-
| <code><nowiki>{{PM item|Spaghetti|link=Spaghetti Plate}}</nowiki></code> || {{PM item|Spaghetti|link=Spaghetti Plate}}
|-
| <code><nowiki>{{PM item|Hot Shroom}}</nowiki></code> || {{PM item|Hot Shroom}}
|-
| <code><nowiki>{{PM item|Whacka's Bump|sep=<br>}}</nowiki></code> || {{PM item|Whacka's Bump|sep=<br>}}
|-
| <code><nowiki>{{PM item|Jammin' Jelly|text=Jammin' Jelly}}</nowiki></code> || {{PM item|Jammin' Jelly|text=Jammin' Jelly}}
|-
| <code><nowiki>{{PM item|Jammin' Jelly|wikitext=Jammin' Jelly}}</nowiki></code> || {{PM item|Jammin' Jelly|wikitext=Jammin' Jelly}}
|-
| <code><nowiki>{{PM item|Mystery Box (item)|Mystery?}}</nowiki></code> || {{PM item|Mystery Box (item)|Mystery?}}
|-
| <code><nowiki>{{PM item|item=Mystery?|Mystery Box (item)}}</nowiki></code> || {{PM item|item=Mystery?|Mystery Box (item)}}
|-
| <code><nowiki>{{PM item|link=Mystery Box (item)|Mystery?}}</nowiki></code> || {{PM item|link=Mystery Box (item)|Mystery?}}
|-
| <code><nowiki>{{PM item|POW Block|link=}}</nowiki></code> || {{PM item|POW Block|link=}}
|-
| <code><nowiki>{{PM item|POW Block|text=}}</nowiki></code> || {{PM item|POW Block|text=}}
|-
| <code><nowiki>{{PM item|POW Block|link=|text=}}</nowiki></code> || {{PM item|POW Block|link=|text=}}
|-
| <code><nowiki>{{PM item|game=TTYD|Spaghetti|link=Spaghetti Plate}}</nowiki></code> || {{PM item|game=TTYD|Spaghetti|link=Spaghetti Plate}}
|-
| <code><nowiki>{{PM item|game=SPM|Spaghetti Plate}}</nowiki></code> || {{PM item|game=SPM|Spaghetti Plate}}
|-
| <code><nowiki>{{PM item|game=CS|Café Key}}</nowiki></code> || {{PM item|game=CS|Café Key}}
|-
| <code><nowiki>{{PM item|game=TOK|Mushroom}}</nowiki></code> || {{PM item|game=TOK|Mushroom}}
|-
| <code><nowiki>{{PM item|game=TOK|1-Up Mushroom}}</nowiki></code> || {{PM item|game=TOK|1-Up Mushroom}}
|-
| <code><nowiki>{{PM item|game=TOK|Spring of Rainbows - VIP}}</nowiki></code> || {{PM item|game=TOK|Spring of Rainbows - VIP}}
|-
| <code><nowiki>{{PM item|game=TOK|Key to Bowser's Castle}}</nowiki></code> || {{PM item|game=TOK|Key to Bowser's Castle}}
|-
| <code><nowiki>{{PM item|game=TOK|"M-A-X Power!"}}</nowiki></code> || {{PM item|game=TOK|"M-A-X Power!"}}
|-
| <code><nowiki>{{PM item|game=TOK|"Deep, Deep Vibes"}}</nowiki></code> || {{PM item|game=TOK|"Deep, Deep Vibes"}}
|}


<pre>
==See also==
{{PM item|Hot Shroom}}
*{{tem|PMTTYD item}}
</pre>
*{{tem|SPM item}}
*[[Module:PM item]]


{{PM item|Hot Shroom}}
[[Category:Content templates]]</noinclude>
 
<pre>
{{PM item|Whacka's Bump|sep=<br>}}
</pre>
 
{{PM item|Whacka's Bump|sep=<br>}}
 
<pre>
{{PM item|Jammin' Jelly|text=Jammin' Jelly}}
</pre>
 
{{PM item|Jammin' Jelly|text=Jammin' Jelly}}
 
<pre>
{{PM item|Mystery Box (item)|Mystery?}}
</pre>
 
{{PM item|Mystery Box (item)|Mystery?}}
 
<pre>
{{PM item|item=Mystery?|Mystery Box (item)}}
</pre>
 
{{PM item|item=Mystery?|Mystery Box (item)}}
 
<pre>
{{PM item|link=Mystery Box (item)|Mystery?}}
</pre>
 
{{PM item|link=Mystery Box (item)|Mystery?}}
 
<pre>
{{PM item|POW Block|link=|text=}}
</pre>
 
{{PM item|POW Block|link=|text=}}
 
<pre>
{{PM item|game=TTYD|Spaghetti}}
</pre>
 
{{PM item|game=TTYD|Spaghetti}}
 
<pre>
{{PM item|game=SPM|Spaghetti Plate}}
</pre>
 
{{PM item|game=SPM|Spaghetti Plate}}
 
<pre>
{{PM item|game=PMTOK|Mushroom}}
</pre>
 
{{PM item|game=PMTOK|Mushroom}}
 
<pre>
{{PM item|game=PMTOK|1-Up Mushroom}}
</pre>
 
{{PM item|game=PMTOK|1-Up Mushroom}}
 
<pre>
{{PM item|game=PMTOK|Spring of Rainbows - VIP}}
</pre>
 
{{PM item|game=PMTOK|Spring of Rainbows - VIP}}
 
<pre>
{{PM item|game=PMTOK|Key to Bowser's Castle}}
</pre>
 
{{PM item|game=PMTOK|Key to Bowser's Castle}}
 
<pre>
{{PM item|game=PMTOK|"M-A-X Power!"}}
</pre>
 
{{PM item|game=PMTOK|"M-A-X Power!"}}
 
<pre>
{{PM item|game=PMTOK|"Deep, Deep Vibes"}}
</pre>
 
{{PM item|game=PMTOK|"Deep, Deep Vibes"}}
 
== See also ==
* {{tem|TTYD item}}
* {{tem|SPM item}}
 
[[Category:Formatting templates]]
</noinclude>

Latest revision as of 14:00, May 3, 2022

This template creates a page link related to Paper Mario with an associated item image on the left side.

Parameters

Name Usage
{{{1}}} Set the defaults for {{{item}}}, {{{link}}}, and {{{text}}}
{{{item}}} or {{{2}}} Set the item to be displayed
{{{size}}} Set the item image size
{{{right}}} Set the position of the item image
{{{link}}} Set the page to link
{{{text}}} Set the text to be displayed
{{{color}}} Set the text color
{{{wikitext}}} Override {{{text}}}
{{{sep}}} Set the separator between the item image and text
{{{game}}} PM (default), TTYD, SPM, CS, or TOK

Examples

Code Result
{{PM item|Spaghetti|link=Spaghetti Plate}} PaperMario Items Spaghetti.png Spaghetti
{{PM item|Hot Shroom}} PaperMario Items HotShroom.png Hot Shroom
{{PM item|Whacka's Bump|sep=<br>}} PaperMario Items WhackasBump.png
Whacka's Bump
{{PM item|Jammin' Jelly|text=Jammin' Jelly}} PaperMario Items JamminJelly.png Jammin' Jelly
{{PM item|Jammin' Jelly|wikitext=Jammin' Jelly}} PaperMario Items JamminJelly.png Jammin' Jelly
{{PM item|Mystery Box (item)|Mystery?}} PaperMario Items Mystery.png Mystery?
{{PM item|item=Mystery?|Mystery Box (item)}} PaperMario Items Mystery.png Mystery Box (item)
{{PM item|link=Mystery Box (item)|Mystery?}} PaperMario Items Mystery.png Mystery?
{{PM item|POW Block|link=}} PaperMario Items POWBlock.png POW Block
{{PM item|POW Block|text=}} PaperMario Items POWBlock.png
{{PM item|POW Block|link=|text=}} PaperMario Items POWBlock.png
{{PM item|game=TTYD|Spaghetti|link=Spaghetti Plate}} Spaghetti TTYD.png Spaghetti
{{PM item|game=SPM|Spaghetti Plate}} Spaghetti Plate SPM.png Spaghetti Plate
{{PM item|game=CS|Café Key}} The Café Key icon from Paper Mario: Color Splash Café Key
{{PM item|game=TOK|Mushroom}} An item from Paper Mario: The Origami King. Mushroom
{{PM item|game=TOK|1-Up Mushroom}} A 1-Up Mushroom from Paper Mario: The Origami King. 1-Up Mushroom
{{PM item|game=TOK|Spring of Rainbows - VIP}} An item from Paper Mario: The Origami King. Spring of Rainbows - VIP
{{PM item|game=TOK|Key to Bowser's Castle}} An item from Paper Mario: The Origami King. Key to Bowser's Castle
{{PM item|game=TOK|"M-A-X Power!"}} An item from Paper Mario: The Origami King. "M-A-X Power!"
{{PM item|game=TOK|"Deep, Deep Vibes"}} An item from Paper Mario: The Origami King. "Deep, Deep Vibes"

See also