Difference between revisions of "Template:Icon Small"

From RimWorld Wiki
Jump to navigation Jump to search
(Undo revision 108998 by Ickputzdirwech (talk) - royalty and ideology etc are used like a note - essentially in place of a citation mark, while icons are used in the main text. It also isn't consistently applied depending on the iccon in question (e.g. steel v components). Looks weird in many of the palces its been used as well.)
Tag: Undo
Line 1: Line 1:
<includeonly><sup>{{#ifeq: {{#ifexist: {{#vardefineecho: iconname | {{ucfirst: {{{1|}}} }} }} | TRUE | FALSE}}
+
<includeonly>{{#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}}  
Line 5: Line 5:
 
     | [[{{#show: {{#var:iconname}} | ?image | link = none }}|{{#if:{{{2|}}}|{{{2|}}}|16}}px|{{#var:iconname}}|link={{#ifeq: {{#var:iconname}}|{{PAGENAME}}||{{#var:iconname}}}}]]
 
     | [[{{#show: {{#var:iconname}} | ?image | link = none }}|{{#if:{{{2|}}}|{{{2|}}}|16}}px|{{#var:iconname}}|link={{#ifeq: {{#var:iconname}}|{{PAGENAME}}||{{#var:iconname}}}}]]
 
   }}
 
   }}
}}</sup>{{#if:{{{3|}}}|&nbsp;{{{3|}}}}}</includeonly><noinclude>
+
}}{{#if:{{{3|}}}|&nbsp;{{{3|}}}}}</includeonly><noinclude>
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 12:07, 16 September 2022

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: Steel

{{Icon Small|steel}}

Icon with Size: Wood

{{Icon Small|Wood|32}}

Icon with Amount: Potatoes 10

{{Icon Small|Potatoes||10}}

Icon with Size and Amount: Chemfuel 150

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