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
 
(9 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: text | {{{text|{{#var:item}}}}}
|link{{#ifeq:{{{link|}}}|{{{link}}}||NULL}}={{{link}}}
}}{{
|text{{#ifeq:{{{text|}}}|{{{text}}}||NULL}}={{{text}}}
  #vardefine: image-size | {{{size|{{
|color{{#ifeq:{{{color|}}}|{{{color}}}||NULL}}={{{color}}}
    #switch: {{#var:game}}
|wikitext{{#ifeq:{{{wikitext|}}}|{{{wikitext}}}||NULL}}={{{wikitext}}}
    | PM      =
|sep{{#ifeq:{{{sep|}}}|{{{sep}}}||NULL}}={{{sep}}}
    | TTYD    = 25x25px
}}</includeonly><noinclude>
    | SPM      =
    | #default = 50x50px
  }}}}}
}}{{
  #vardefine: image-prefix | {{
    #switch: {{#var:game}}
    | PM      = PaperMario Items&#32;
    | PMCS    = PMCS Item&#32;
    | #default =
  }}
}}{{
  #vardefine: image-suffix | {{
    #switch: {{#var:game}}
    | TTYD    = &#32;TTYD
    | SPM      = &#32;SPM
    | PMSS    = &#32;Sticker PMSS
    | PMTOK    = &#32;PMTOK icon
    | #default =
  }}
}}{{
  #vardefine: image-base | {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{item|{{#var:item}}}}}|é|e}}|×|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 | {{
    #if: {{#var:image-size}}
    | [[File:{{#var:image-prefix}}{{#var:image-base}}{{#var:image-suffix}}.png|{{#var:image-size}}|link={{#var:link}}]]
    | [[File:{{#var:image-prefix}}{{#var:image-base}}{{#var:image-suffix}}.png|link={{#var:link}}]]
  }}
}}{{
  #vardefine: wikitext | {{{wikitext|{{
    #if: {{#var:text}}
    | {{#if: {{#var:link}}
      | {{#if: {{{color|}}}
        | {{color-link-piped|{{#var:link}}|{{{color}}}|{{#var:text}}}}
        | [[{{#var:link}}|{{#var:text}}]]
      }}
      | {{#if: {{{color|}}}
        | <span style="color:{{{color}}}">{{#var:text}}</span>
        | {{#var:text}}
      }}
    }}
  }}}}}
}}{{nowrap|{{
  #if: {{{right|}}}
  | {{#var:wikitext}}{{{sep| }}}{{#var:image}}
  | {{#var:image}}{{{sep| }}}{{#var:wikitext}}
}}}}</includeonly><noinclude>
This template creates a page link related to ''[[Paper Mario]]'' with an associated item image on the left side.
This template creates a page link related to ''[[Paper Mario]]'' with an associated item image on the left side.


{{/parameters|all=1}}
{{/parameters|all=1}}


== Examples ==
==Examples==
{| class="wikitable"
{|class="wikitable"
! Code
!Code
! Result
!Result
|-
|-
| <code><nowiki>{{PM item|Spaghetti}}</nowiki></code> || {{PM item|Spaghetti}}
|<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|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|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|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|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|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|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|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|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|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|POW Block|link=|text=}}</nowiki></code>||{{PM item|POW Block|link=|text=}}
|-
|-
| <code><nowiki>{{PM item|game=TTYD|Spaghetti}}</nowiki></code> || {{PM item|game=TTYD|Spaghetti}}
|<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=SPM|Spaghetti Plate}}</nowiki></code>||{{PM item|game=SPM|Spaghetti Plate}}
|-
|-
| <code><nowiki>{{PM item|game=PMSS|Sticker#Cat-o-Luck|Cat-o-Luck}}</nowiki></code> || {{PM item|game=PMSS|Sticker#Cat-o-Luck|Cat-o-Luck}}
|<code><nowiki>{{PM item|game=CS|Café Key}}</nowiki></code>||{{PM item|game=CS|Café Key}}
|-
|-
| <code><nowiki>{{PM item|game=PMCS|Café Key}}</nowiki></code> || {{PM item|game=PMCS|Café Key}}
|<code><nowiki>{{PM item|game=TOK|Mushroom}}</nowiki></code>||{{PM item|game=TOK|Mushroom}}
|-
|-
| <code><nowiki>{{PM item|game=PMTOK|Mushroom}}</nowiki></code> || {{PM item|game=PMTOK|Mushroom}}
|<code><nowiki>{{PM item|game=TOK|1-Up Mushroom}}</nowiki></code>||{{PM item|game=TOK|1-Up Mushroom}}
|-
|-
| <code><nowiki>{{PM item|game=PMTOK|1-Up Mushroom}}</nowiki></code> || {{PM item|game=PMTOK|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=PMTOK|Spring of Rainbows - VIP}}</nowiki></code> || {{PM item|game=PMTOK|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=PMTOK|Key to Bowser's Castle}}</nowiki></code> || {{PM item|game=PMTOK|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=PMTOK|"M-A-X Power!"}}</nowiki></code> || {{PM item|game=PMTOK|"M-A-X Power!"}}
|<code><nowiki>{{PM item|game=TOK|"Deep, Deep Vibes"}}</nowiki></code>||{{PM item|game=TOK|"Deep, Deep Vibes"}}
|-
| <code><nowiki>{{PM item|game=PMTOK|"Deep, Deep Vibes"}}</nowiki></code> || {{PM item|game=PMTOK|"Deep, Deep Vibes"}}
|}
|}


== See also ==
==See also==
* {{tem|TTYD item}}
*{{tem|PMTTYD item}}
* {{tem|SPM item}}
*{{tem|SPM item}}
*[[Module:PM item]]


[[Category:Formatting templates]]
[[Category:Content templates]]</noinclude>
</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