Difference between revisions of "Template:ItemText"

From Animal Crossing: Pocket Camp Wiki
Jump to: navigation, search
(Optimize?)
(Optimize?)
Line 1: Line 1:
<includeonly>{{#switch: {{{1|}}}
+
<includeonly>{{#vardefine:image
| Bells = {{#vardefine:image|Bells}}
+
| {{#switch:{{{1|}}}
  +
| Bells = Bells
| Leaf Ticket = {{#vardefine:image|Leaf_Ticket}}
 
| Caps = {{#vardefine:image|Caps}}
+
| Caps = Caps
 
| Leaf Ticket = Leaf_Ticket
| #default = {{#vardefine:image|{{#cargo_query:tables=Entities|fields=Image|where=_pageName="{{{1|}}}"|default=Error-image|no html}}}}
 
  +
| = Error-image
}}[[File:{{#var:image}}.png|{{{size|24px}}}|link={{{1|}}}]] {{#if:{{{link|}}} | [[{{{1|}}}]] | {{{1|}}} }}</includeonly><noinclude>{{doc}}[[Category:Templates]]</noinclude>
 
  +
| #default =
  +
{{#var:{{{1|}}}.Image
  +
| {{#vardefineecho:{{{1|}}}.Image
 
| {{#cargo_query:tables=Entities|fields=Image|where=_pageName="{{{1|}}}"|default=Error-image|no html}}
  +
}}
  +
}}
  +
}}
 
}}[[File:{{#var:image}}.png|24px|link={{{1|}}}]] {{#if:{{{link|}}} | [[{{{1|}}}]] | {{{1|}}} }}</includeonly><noinclude>
  +
{{doc}}[[Category:Templates]]
  +
</noinclude>

Revision as of 14:45, 24 January 2021

Template-info.png Documentation

Description

Template to be used to display item icon and text.

Usage

{{ItemText|ITEM|size=SIZE|link=}}

Example

{{ItemText|Request Ticket}}

Request Ticket.png Request Ticket

{{ItemText|Shark|size=50px}}

Fish fst0203.png Shark

{{ItemText|Stardust Gift+|size=32px|link=yes}}

Friendgift reg fc002.png Stardust Gift+

{{ItemText|OK Motors Acorn Tree|link=y}}

Int tre15 photospot cmps.png OK Motors Acorn Tree