Editing Template:Icon Small

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<includeonly>{{#ifeq: {{#ifexist: {{#vardefineecho: iconname | {{ucfirst: {{{1|}}} }} }} | TRUE | FALSE}}
+
<onlyinclude>{{#vardefine: name    | {{ucfirst:{{{1|}}}
  | FALSE | [[{{#var:iconname}}]] {{Error|(Error: Page does not exist)}}
+
}}}}{{#ifeq: {{#ifexist: {{#var:name}}| TRUE | FALSE}}| FALSE | [[{{#var:name}}]](Page does not exist)
  | {{#ifeq: {{#if: {{#show: {{#var:iconname}} | ?image | link = none }} | TRUE | FALSE}}  
+
|{{#ifeq: {{#ifexist: {{#show: {{#var:name}} | ?image | link = none }}| TRUE | FALSE}}| FALSE | [[{{#var:name}}]] (Page has no "Image")  
    | FALSE | [[{{#var:iconname}}]] {{Error|(Error: Page has no [[Property:Image]])}}
+
|[[{{#show: {{#var:name}} | ?image | link = none }}|{{#if:{{{2|}}}|{{{2|}}}|16}}px|link={{#var:name}}]]
    | [[{{#show: {{#var:iconname}} | ?image | link = none }}|{{#if:{{{2|}}}|{{{2|}}}|16}}px|{{#var:iconname}}|link={{#ifeq: {{#var:iconname}}|{{PAGENAME}}||{{#var:iconname}}}}]]
+
}} }}</onlyinclude><noinclude>
  }}
+
</br>
}}{{#if:{{{3|}}}|&nbsp;{{{3|}}}}}</includeonly><noinclude>
+
== Description==
{{documentation}}
+
Will give a small icon (16px default)</br>
 +
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 inproper used
 +
 
 +
== Usage ==
 +
<pre>{{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
 +
}}</pre>
 +
=== Examples ===
 +
Just an icon: {{Icon Small|steel}}
 +
<pre>{{Icon Small|steel}}</pre>
 +
 
 +
Icon with Size: {{Icon Small|Wood|32}}
 +
<pre>{{Icon Small|Wood|32}}</pre>
 
</noinclude>
 
</noinclude>

Please note that all contributions to RimWorld Wiki are considered to be released under the CC BY-SA 3.0 (see RimWorld Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)