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
 
(26 intermediate revisions by 4 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}}}
    #ifeq:{{#var:game}}
|text{{#ifeq:{{{text|}}}|{{{text}}}||NULL}}={{{text}}}
    |PM
|color{{#ifeq:{{{color|}}}|{{{color}}}||NULL}}={{{color}}}
    |PaperMario Items&#32;
|wikitext{{#ifeq:{{{wikitext|}}}|{{{wikitext}}}||NULL}}={{{wikitext}}}
    |
|sep{{#ifeq:{{{sep|}}}|{{{sep}}}||NULL}}={{{sep}}}
  }}
}}</includeonly><noinclude>
}}{{
This template creates a page link related to ''[[Paper Mario]]'' with an associated item image on the left side.
  #vardefine:image-suffix|{{
    #ifeq:{{#var:game}}
    |PM
    |
    |&#32;{{#var:game}}
  }}
}}{{
  #vardefine:image-base|{{#replace:{{#replace:{{#replace:{{#replace:{{{item|{{#var:item}}}}}|×|x}}|.|}}|'|}}|?|}}
}}{{
  #vardefine:image-base|{{
    #ifeq:{{#var:game}}
    |PM
    |{{#replace:{{#var:image-base}}| |}}
    |{{#var:image-base}}
  }}
}}{{
  #vardefine:image|[[File:{{#var:image-prefix}}{{#var:image-base}}{{#var:image-suffix}}.png|{{{size|{{
    #ifeq:{{#var:game}}
    |TTYD
    |25x25px
    |&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|link=Whacka Bump|sep=<br>}}</nowiki></code>||{{PM item|Whacka's Bump|link=Whacka 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|Spaghetti|game=TTYD}}
</pre>
 
{{PM item|Spaghetti|game=TTYD}}
 
<pre>
{{PM item|Spaghetti Plate|game=SPM}}
</pre>
 
{{PM item|Spaghetti Plate|game=SPM}}
 
== See also ==
* {{tem|TTYD item}}
* {{tem|SPM item}}
 
[[Category:Formatting templates]]
</noinclude>

Latest revision as of 21:19, August 17, 2024

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, TTYDNS, SPM, CS, or TOK

Examples

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

See also