Difference between revisions of "Template:ItemText"

From Animal Crossing: Pocket Camp Wiki
Jump to: navigation, search
m
(Optimize?)
(One intermediate revision by the same user not shown)
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 = {{#ifeq: {{#cargo_query:tables=Entities|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
| = Error-image
| {{#ifeq: {{#cargo_query:tables=CraftMaterials|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
| #default =
| {{#ifeq: {{#cargo_query:tables=Snacks|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
{{#var:{{{1|}}}.Image
| {{#ifeq: {{#cargo_query:tables=Maps|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
| {{#vardefineecho:{{{1|}}}.Image
| {{#ifeq: {{#cargo_query:tables=Tools|where=_pageName="{{{1|}}}"|default=No}} | No
 
| {{#ifeq: {{#cargo_query:tables=Seeds|where=_pageName="{{{1|}}}"|default=No}} | No
+
| {{#cargo_query:tables=Entities|fields=Image|where=_pageName="{{{1|}}}"|default=Error-image|no html}}
  +
}}
| {{#ifeq: {{#cargo_query:tables=FortuneCookies|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
}}
| {{#ifeq: {{#cargo_query:tables=Cargo|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
}}
| {{#ifeq: {{#cargo_query:tables=CampsiteTerrain|where=_pageName="{{{1|}}}"|default=No}} | No
 
 
}}[[File:{{#var:image}}.png|24px|link={{{1|}}}]] {{#if:{{{link|}}} | [[{{{1|}}}]] | {{{1|}}} }}</includeonly><noinclude>
| {{#ifeq: {{#cargo_query:tables=Gift|where=_pageName="{{{1|}}}"|default=No}} | No
 
  +
{{doc}}[[Category:Templates]]
| {{#vardefine:image|Error-image}}
 
  +
</noinclude>
| {{#vardefine:image|{{#cargo_query:tables=Gift|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=CampsiteTerrain|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Cargo|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=FortuneCookies|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Seeds|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Tools|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Maps|fields=IconImage|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Snacks|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=CraftMaterials|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
| {{#vardefine:image|{{#cargo_query:tables=Entities|fields=Image|where=_pageName="{{{1|}}}"|no html}}}}}}
 
}}[[File:{{#var:image}}.png|{{{size|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