Template:Itemimage/doc

From Feed The Beast Wiki
Jump to: navigation, search

This template returns the name of the item image for a given item. It will use Block NAME.png, Item NAME.png, or Grid NAME.png, in that order. If none of these exists, nothing will be returned.

Please note that this template uses the "expensive" #ifexist parser function three times - there may only be a certain amount of expensive parser functions on a page, otherwise they will not work correctly. This template should thus not be called very often.

Examples[edit]

Input Output
{{itemimage|<Cobblestone>}} Block Cobblestone.png
{{itemimage|<Iron Pickaxe>}} Item Iron Pickaxe.png
{{itemimage}}

The last example will not return anything, as it will try to find an image for an item named the same as the page title ("Itemimage/doc"), which does not exist.