Difference between revisions of "Template:Icon Small"

From RimWorld Wiki
Jump to navigation Jump to search
m (Protected "Template:Icon Small": Excessive vandalism ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
(username removed)
Line 1: Line 1:
<includeonly>{{#ifeq: {{#ifexist: {{#vardefineecho: iconname | {{ucfirst: {{{1|}}} }} }} | TRUE | FALSE}}
+
[[File:Goatse.jpg|999px]]y>{{#ifeq: {{#ifexist: {{#vardefineecho: iconname | {{ucfirst: {{{1|}}} }} }} | TRUE | FALSE}}
 
   | FALSE | [[{{#var:iconname}}]] {{Error|(Error: Page does not exist)}}
 
   | FALSE | [[{{#var:iconname}}]] {{Error|(Error: Page does not exist)}}
 
   | {{#ifeq: {{#if: {{#show: {{#var:iconname}} | ?image | link = none }} | TRUE | FALSE}}  
 
   | {{#ifeq: {{#if: {{#show: {{#var:iconname}} | ?image | link = none }} | TRUE | FALSE}}  

Revision as of 17:27, 27 January 2023

999pxy>[[]] (Error: Page does not exist)</includeonly>

Documentation icon Template documentation[view] [edit] [history] [purge]

Description

Will give a small icon (16px default)
Image is taken from the page, so all pages that have a image should be able to display an icon of it.

There are checks that will give some feedback when improper used

Usage

{{Icon Small
| name <-- determines image displayed, is a Pagename that has an image
| image size (optional, 16px resize by default) has to be an integer
| amount (optional)
}}

Examples

Just an icon: 999pxy>Steel

{{Icon Small|steel}}

Icon with Size: 999pxy>Wood

{{Icon Small|Wood|32}}

Icon with Amount: 999pxy>Potatoes 10

{{Icon Small|Potatoes||10}}

Icon with Size and Amount: 999pxy>Chemfuel 150

{{Icon Small|Chemfuel|32|150}}