Template:Img item/doc: Difference between revisions

From PZwiki
(Created page with "<noinclude>{{Documentation subpage}}</noinclude> The {{tlx|img_item}} template is used to generate an item image by simply knowing the display name or class name. ==Usage== <...")
 
No edit summary
Line 1: Line 1:
<noinclude>{{Documentation subpage}}</noinclude>
<noinclude>{{Documentation subpage}}</noinclude>
The {{tlx|img_item}} template is used to generate an item image by simply knowing the display name or class name.
The {{tlx|img_item}} template is used to generate an item image by simply knowing the display name or item ID.
 
==Editing==
To add new definitions or edit an existing one, please go to the following subpages:
*[[Template:Img_item/icon|Img_item/icon]] - for the icon
*[[Template:Img_item/link|Img_item/link]] - for the link
*[[Template:Img_item/name|Img_item/name]] - for the name


==Usage==
==Usage==
Line 12: Line 18:
;item: Determines the item image, name and link. Can be the item's display name, class name or previous names (so long as there are no conflicts). ''Default: [[:File:image.png]]''
;item: Determines the item image, name and link. Can be the item's display name, class name or previous names (so long as there are no conflicts). ''Default: [[:File:image.png]]''
;size: The size of the image the image. This can be left blank unless needed to be customised. ''Default: 32px''
;size: The size of the image the image. This can be left blank unless needed to be customised. ''Default: 32px''
;icon: Manually set the image to be displayed.
;link: Manually set the link for the image.
;name: Manually set the "name" to show when hovering over.


==Examples==
==Examples==

Revision as of 10:34, 30 July 2021

Notebook.png
This is a documentation subpage for Template:Img item.
It contains usage information and other content that is not part of the original template page.

The {{img_item}} template is used to generate an item image by simply knowing the display name or item ID.

Editing

To add new definitions or edit an existing one, please go to the following subpages:

Usage

{{img_item
|item = 
|size = 
}}

Image.png

Parameters

item
Determines the item image, name and link. Can be the item's display name, class name or previous names (so long as there are no conflicts). Default: File:image.png
size
The size of the image the image. This can be left blank unless needed to be customised. Default: 32px
icon
Manually set the image to be displayed.
link
Manually set the link for the image.
name
Manually set the "name" to show when hovering over.

Examples

Box of Shutgon Shells
Using the class name:
{{img_item|item=ShotgunShellsBox|size=32px}}

Produces

Box of Shotgun Shells


Using the display name:
{{img_item|item=Box of Shutgon Shells|size=32px}}

Produces

Box of Shotgun Shells