Template talk:Item

From Terraria Wiki
Jump to navigation Jump to search

Icon Issues

I really like how the item link template automatically adds icons to itself, however this seems to add icons to something even if just a section of it has a mobile only, console only, or desktop only template Awesome_Diamonds 19:09, 29 April 2017 (UTC)

I will need to work on making it "smarter". I have had some ideas. For now, there is a switch to turn off the icons. {{item|some item|icons=no}} – Ferretwings (talk) 03:00, 30 April 2017 (UTC)

Update with that, please

[[File:{{{1}}}.png|link={{Item link redirect|{{{1}}}}}{{#if:{{{size|}}}|{{!}}{{{size}}}}}]]{{#if:{{{nocaption|}}}||[[{{Item link redirect|{{{1}}}}}|{{{1}}}]]}}

== Description ==
<!pre>{{item|<item name>|size=|nocaption=}}</!pre>

Displays a link to the item and adds a item icon in front of it.

=== Parameters ===
; ''unnamed parameter'' 1
: Item name.
; ''size''
: Optional parameter to set the width. 
; ''nocaption''
: Optional parameter to disable text.

== Examples ==
* {{item|Bed}} <-- is produced from <code>{{item|Bed}}</code>
* {{item|Wood}} <-- is produced from <code>{{item|Wood}}</code>

== Notes ==
To avoid html bloat, item link is not in a "nowrap". If you wish for a nowrap effect, please add them to the general table style.

[[Category:Icon templates|Item icon]]
</noinclude>

il2l

Why is the functionality of Template:Item link 2-line not simply included in this template? As far as I can tell, the output when not using the added options is the same. So, unless there's some issue with added processing time with the extra code...? --Littlebeasti (talk) 06:38, 22 July 2015 (UTC)

interwikis

Please add interwikis: fr:Modèle:Item link ko:틀:아이템 링크 pl:Szablon:Item link pt:Predefinição:Item link ru:Шаблон:Item link zh:Template:Item linkAlex Great talk 08:09, 29 July 2015 (UTC)

Please change and add zh-cn interwikis:

ru:Шаблон:ПредметСсылка zh-cn:模板:Item link ← Alex Great talk 08:01, 6 August 2015 (UTC)

Properly use .gif files

Currently, the template can only use .png files, but could it be set up so that if it doesn't detect the proper file, it uses a .gif of that file instead? --172.58.7.127 19:55, 14 June 2020 (UTC)