Template:Item Image: Difference between revisions
From HorizonXI Wiki
(Created page with "<includeonly><div>{{#switch:{{lc:{{{1|}}}}}|stub| = {{#ifexist:File:{{PAGENAME}}.png|[[File:{{PAGENAME}}.png|{{PAGENAME}}]]|<table cellpadding="5" cellspacing="0" style="background-color: transparent;"><tr><td>30px|</td><td>''This article is missing a picture of the item it covers. You can help by [[File:{{PAGENAME}}.png|adding it]].''</td></tr></table> {{#ifeq:{{NAMESPACE}}||Category:Image Stub}}}}|File:{{{1|}}}|366px|link={{{3}}}|{{{2|{{PA...") Tag: visualeditor-wikitext |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div>{{#switch:{{lc:{{{1|}}}}}|stub| = {{#ifexist:File:{{PAGENAME}}.png|[[File:{{PAGENAME}}.png|{{PAGENAME}}]]|<table cellpadding="5" cellspacing="0" style="background-color: transparent;"><tr><td>[[File: | <includeonly><div>{{#switch:{{lc:{{{1|}}}}}|stub| = {{#ifexist:File:{{PAGENAME}}.png|[[File:{{PAGENAME}}.png|{{PAGENAME}}]]|<table cellpadding="5" cellspacing="0" style="background-color: transparent;"><tr><td>[[File:Camera icon.gif|30px|]]</td><td>''This article is missing a picture of the item it covers. You can help by [[File:{{PAGENAME}}.png|adding it]].''</td></tr></table> | ||
{{#ifeq:{{NAMESPACE}}||[[Category:Image Stub]]}}}}|[[File:{{{1|}}}|366px|link={{{3}}}|{{{2|{{PAGENAME}}}}}]]}}</div></includeonly><noinclude> | {{#ifeq:{{NAMESPACE}}||[[Category:Image Stub]]}}}}|[[File:{{{1|}}}|366px|link={{{3}}}|{{{2|{{PAGENAME}}}}}]]}}</div></includeonly><noinclude> | ||
[[Category:Templates]] | [[Category:Templates]] |
Latest revision as of 23:36, 9 February 2023
Usage
{{Item Image|<image name>|<hovertext>|<link>}}
- image name: The name of the image, such as "Dagger.png". If left blank, a message asking for the image will display instead.
- hovertext: (optional) The text to display when the mouse is hovered over the image. If left blank, the page's name will display.
- link: (optional) On clicking the image, where you are taken. This should be the item's page, so that the image can be transcluded and used as a link to the item (note that the magic word {{NAMESPACE}} will not work for this function. If left blank, it will link to the image's file.
Examples
Code | Result | ||
---|---|---|---|
{{Item Image|Dagger.PNG}} |
|||
{{Item Image|Silent_Oil.png|Pot of silent oil}} |
|||
{{Item Image|Beehive chip.jpg||Beehive Chip}} |
|||
{{Item Image|}} |
|