Template talk:Item
From WoWWiki
Contents |
Documentation
The template produces a link to a specific item, pulling information from that item's own wiki page, with or without the item's icon.
This template is not to be used on item lists!
Usage: {{item|<Item Page Name>|<Display Name>}} + |icon= if desired (just an empty flag to signify you want to display the icon)
Test Vectors:
-
{{item|Knight-Captain's Silk Legguards|icon=}}:
[Knight-Captain's Silk Legguards]
-
{{item|Runic Leather Headband|Runic Leather Headbands}}: [Runic Leather Headbands]
Is this {{loot}}?
It might not have been the intention, but isn't this now an improved version of template:loot?
And if so, should someone with a bot replace the use of {{loot}} with this template? —MJBurrage(T•C) 14:55, 28 December 2007 (UTC)
- This template doesn't quite work with being included in {{tooltip}}/{{settip}}. --Pcj (T•C) 14:59, 28 December 2007 (UTC)
- In most situations you should use {{item}}. There are a few exceptions - code within {{settip}} and {{tooltip}} tags on pages should use {{loot}}. -- Starlightblunder 23:04, 28 December 2007 (UTC)
- IMO, The only real advantage of {{item}} over {{loot}} is that you can add an icon to it. Again, in my understanding, 'loot' is also simpler, and now involves yet fewer "if" clauses, which - on pages with LOTS of links - the wiki eventually chokes on. Unless you can show me that {{item}} is superior in some other useful way, I'll continue to use {{loot}}. --Eirik Ratcatcher (talk) 17:13, 3 July 2008 (UTC)
Performance
... isn't something I'm sure of at the moment, so I'm leaving the template in this reduced functionality form over the next few hours; will revert changes later and see if the situation repeats itself. -- Foxlit 02:23, 5 January 2008 (UTC)
- Tweaked the inclusion mechanism a bit in conjunction with Template:Tooltip, should reduce the amount of inclusions the wiki parser has to handle when linking items using item to slightly below the level of Lootbox; very large lists of items may still cause issues. -- Foxlit 13:57, 6 January 2008 (UTC)
- If I try to use this with a huge list like Leatherworking patterns (which instead uses the loot template), the server stops processing templates part of the way through. Though not essential, it'd be nice for lists like that to have the option of displaying item icons. Would this be feasible? :) -- W.woods 16:23, 21 March 2008 (UTC)
- You'd run into the same problem for icons in a list. The server fails because of pre-inclusion size, not post-inclusion. --Pcj (T•C) 16:41, 21 March 2008 (UTC)
- Thanks :) Is the efficiency of this likely to improve in the foreseeable future (to the point where I could add icons), or is this something I should just forget about completely? ;) --W.woods 03:24, 27 March 2008 (UTC)
- Not likely; the only way you could end up using {{item}} on that list is if wikia increases the pre-inclusion limit significantly; you could specify all icons manually meanwhile, but that seems like a horrible amount of effort. -- foxlit 23:14, 5 April 2008 (UTC)
- Thanks :) Is the efficiency of this likely to improve in the foreseeable future (to the point where I could add icons), or is this something I should just forget about completely? ;) --W.woods 03:24, 27 March 2008 (UTC)
- You'd run into the same problem for icons in a list. The server fails because of pre-inclusion size, not post-inclusion. --Pcj (T•C) 16:41, 21 March 2008 (UTC)
- Another consideration... with javascript tooltip popups, are those icons REALLY necessary? --Eirik Ratcatcher (talk) 17:14, 3 July 2008 (UTC)
- If I try to use this with a huge list like Leatherworking patterns (which instead uses the loot template), the server stops processing templates part of the way through. Though not essential, it'd be nice for lists like that to have the option of displaying item icons. Would this be feasible? :) -- W.woods 16:23, 21 March 2008 (UTC)
With a stub
Using {{Item}} to refer to a page that has no tooltip on it results in unexpectedly bad results. Any chance this could be fixed? --Eirik Ratcatcher 20:41, 31 January 2008 (UTC)
- No; can't really check whether an item page is formed correctly prior to including it. The easiest solution is probably to add a pair of nested includeonly+onlyinclude tags containing a {{loot}} template until the tooltip is updated. -- Foxlit 10:53, 3 February 2008 (UTC)
Icon Size
Would like a method for changing the size of the icon displayed. Madkaugh (talk) 01:32, 20 May 2008 (UTC)
- You might also investigate using {{icon}}. -- Eirik Ratcatcher (talk) 17:15, 3 July 2008 (UTC)