Template:Img item: Difference between revisions
m (Fixed Sawed-off JS-2000 Shotgun) |
m (added updated name for .44 Magnum Round(s)) |
||
Line 16: | Line 16: | ||
| Bullets45Box|Box of .45 Auto Bullets = HandgunAmmoBox | | Bullets45Box|Box of .45 Auto Bullets = HandgunAmmoBox | ||
| 45Clip|.45 Auto Magazine = BerettaClip | | 45Clip|.45 Auto Magazine = BerettaClip | ||
| Bullets44|.44 Magnum Bullets = 40calAmmoBox | | Bullets44|.44 Magnum Bullets|.44 Magnum Round = 40calAmmoBox | ||
| Bullets44Box|Box of .44 Magnum Bullets = HandgunAmmoBox | | Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = HandgunAmmoBox | ||
| 44Clip|.44 Magazine = BerettaClip | | 44Clip|.44 Magazine = BerettaClip | ||
| Bullets38|.38 Special Bullets = 40calAmmoBox | | Bullets38|.38 Special Bullets = 40calAmmoBox | ||
Line 69: | Line 69: | ||
| Bullets45Box|Box of .45 Auto Bullets = .45 Auto | | Bullets45Box|Box of .45 Auto Bullets = .45 Auto | ||
| 45Clip|.45 Auto Magazine = .45 Auto Magazine | | 45Clip|.45 Auto Magazine = .45 Auto Magazine | ||
| Bullets44|.44 Magnum Bullets = .44 Magnum | | Bullets44|.44 Magnum Bullets|.44 Magnum Round = .44 Magnum Round | ||
| Bullets44Box|Box of .44 Magnum Bullets = .44 Magnum | | Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = .44 Magnum Round | ||
| 44Clip|.44 Magazine = .44 Magazine | | 44Clip|.44 Magazine = .44 Magazine | ||
| Bullets38|.38 Special Bullets = .38 Special Bullets | | Bullets38|.38 Special Bullets = .38 Special Bullets | ||
Line 122: | Line 122: | ||
| Bullets45Box|Box of .45 Auto Bullets = Box of .45 Auto Bullets | | Bullets45Box|Box of .45 Auto Bullets = Box of .45 Auto Bullets | ||
| 45Clip|.45 Auto Magazine = .45 Auto Magazine | | 45Clip|.45 Auto Magazine = .45 Auto Magazine | ||
| Bullets44|.44 Magnum Bullets = .44 Magnum | | Bullets44|.44 Magnum Bullets|.44 Magnum Round = .44 Magnum Round | ||
| Bullets44Box|Box of .44 Magnum Bullets = Box of .44 Magnum | | Bullets44Box|Box of .44 Magnum Bullets|Box of .44 Magnum Rounds = Box of .44 Magnum Rounds | ||
| 44Clip|.44 Magazine = .44 Magazine | | 44Clip|.44 Magazine = .44 Magazine | ||
| Bullets38|.38 Special Bullets = .38 Special Bullets | | Bullets38|.38 Special Bullets = .38 Special Bullets |
Revision as of 14:36, 25 July 2021
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:
- Img item/icon - for the icon
- Img item/link - for the link
- Img item/name - for the name
Usage
{{Img item |item = <!-- or {{{1}}} (first anonymous parameter) --> |size = <!-- optional --> |icon = <!-- or |img = --> <!-- optional --> |link = <!-- optional --> |name = <!-- optional --> }}
Parameters
- item
- Determines the item image, name, and link. Can be the item's display name, item ID (without module) or previous names (so long as there are no conflicts). Can be replaced with the first anonymous parameter. Default: File:image.png
- size
- The size of the image. This can be left blank unless needed to be customized. Default: 32px
- icon
- Manually set the image to be displayed. This will normally be left blank. Can be replaced with img.
- link
- Manually set the link for the image. This will normally be left blank.
- name
- Manually set the "name" to show when hovering over. This will normally be left blank.
Anonymous parameters
- See more: Anonymous parameters
- {{{1}}}
- Alternative to item, for simplified markup. Determines the item image, name, and link. Can be the item's display name, item ID (without module) or previous names (so long as there are no conflicts). Default: File:image.png
- {{{2}}}
- Adding "name" will remove the image and only display the name and link. Alternative to using
{{Img item/link}}
and{{Img item/name}}
.
Examples
Type | Produces | Explanation |
---|---|---|
{{Img item|item=ShotgunShellsBox|size=32px}} |
Using the item ID with the item and size parameters. | |
{{Img item|ShotgunShellsBox}} |
The markup can be simplified by removing the item and size parameters, and just including the item ID as the first anonymous parameter. This produces the same result as the above example. | |
{{Img item|icon=Chainsaw_Model|size=64px|name=Zombie slayer|link=Zombie}} |
The icon, size, name and link can be manually adjusted. Here it's showing the Chainsaw model as the icon at size 64px, "Zombie slayer" as the name, and Zombie as the link. | |
{{Img item|ShotgunShellsBox|name}} |
Using just the first and second anonymous parameters, with the second being "name", display just the indexed name and link. |
Documentation transcluded from Template:Img item/doc.
Editors can experiment in this template's sandbox (create)
Editors can experiment in this template's sandbox (create)