Changes

Jump to: navigation, search

Template:Icon

1,424 bytes added, 20:19, 24 February 2017
m
no edit summary
<includeonly>[[File:item-icon-{{#switch:{{{1|}}}
<!-- icon substitutions for lookalike items (in alpha) -->
| lemon = banana
| #default = {{{1|none}}}
}}.png|class=js-icon-tt|{{#if: {{{size|}}} | {{{size}}}{{!}}sub{{!}} }}|{{#switch:{{{1|}}}
<!-- set the item name based on icon name, and link for some -->
| bottle = Empty Bottle
| firedust = Fire Dust{{!}}link=Fire Dust
| milk = Bottle of Milk
| redapple = Red Apple
| saltpeter = Saltpeter{{!}}link=Saltpeter
| sulfur = Sulfur{{!}}link=Sulfur
| milk = Bottle of Milk
| redapple = Red Apple
| water = Bottle of Water
| roughtan = Rough Tannin Powder{{!}}link=Rough Tannin Powder
| decenttan = Decent Tannin Powder{{!}}link=Decent Tannin Powder
| qualitytan = Quality Tannin Powder{{!}}link=Quality Tannin Powder
| shoddy_animalskin = Shoddy Animal Skin{{!}}link=Shoddy Animal Skin
| rough_animalskin = Rough Animal Skin{{!}}link=Rough Animal Skin
| crude_animalskin = Crude Animal Skin{{!}}link=Crude Animal Skin
| decent_animalskin = Decent Animal Skin{{!}}link=Decent Animal Skin
| nice_animalskin = Nice Animal Skin{{!}}link=Nice Animal Skin
| quality_animalskin = Quality Animal Skin{{!}}link=Quality Animal Skin
| potato = Potato{{!}}link=Potato
| onionseedling = Onion Seedling{{!}}link=Onion Seedling
<!-- default uses the shop item naming convention -->
| #default = {{#if:{{{label|}}}|{{{label}}}|{{ucfirst:{{{1}}}}} }}
}}]]</includeonly><noinclude>
__NOTOC__
Do not use this template. Use: [[Template:Item_icon]] instead.==SyntaxUsage==
<pre>
{{icon|<name>}}
{{icon|<name>|size=16px}}
{{icon|<name>|label=<full item name>}}
{{icon|<name>|size=16px|label=<full item name>}}
</pre>
==Description==
This template has several purposes:* Makes some Create an item icons link to relevant article pages instead of the default "File history" page (eg. Saltpeter).* It can save many edits in the future, for example certain foods that have the same icon now (banana & lemon), could have with a unique icon later. The article refers to the individual foods, so the article won't need updating.* Adds mouseover title.* Reduces custom mediawiki code in tooltip that shows the articlesfull item name.
<span style=The template code does the following:* Makes certain icons link to relevant article instead of the "color:redFile history">TODO<page (eg. Saltpeter).* Substitute certain icons during alpha, when several items use the same icon (eg. lemon uses banana icon), this is important so that the wiki article is specifying the proper icons. If/span>: laterwhen these items get a unique icon, this only the substitution in the template could automatically add needs to be removed.* Adds a javascript popup to show mouseover tooltip effect that display the full name of the item .* The capitalized icon nameis the item name by default, which saves providing a separate item name for simple one-word items (eg. "banana" > "Banana").* Automatically provides a long name for common icons, eg. "water" => "Bottle of Water", which reduces code in the article.
==Parameters==
; label
: OPTIONAL. Give Specify the image title, which also becomes a mouseover tooltip text. Use this for long item names where the capitalized icon name does not match, and for items that have use the same icon so the tooltip shows the correct item name (eg. "Advanced Holistic Ink" and "Basic Holistic Ink" which use the same icon).
==Examples==

Navigation menu