Difference between revisions of "Template:BlockImage"
Jump to navigation
Jump to search
(Changed to check if file exists otherwise use missing block texture.) |
(Added template data and category.) |
||
(12 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><div>{{#ifexist:{{{1|}}} | [[File:{{{1}}}.png|160px{{#if:{{{2|}}}|link={{{2}}} }}]] | [[File:No_block_image.png|160px|link={{{1}}}]] }} </div></includeonly> | + | <includeonly><div style="height:160px; text-align:center;">{{#ifexist: File:{{{1|}}}.png| [[File:{{{1}}}.png|160px{{#if:{{{2|}}}|{{!}}link={{{2}}} }}]] | [[File:No_block_image.png|160px|link=File:{{{1}}}.png]] }}</div></includeonly> |
+ | |||
+ | <noinclude>THIS MUST HAVE THE DIV TAGS OR IT NO WORKY! | ||
+ | <templatedata> | ||
+ | { | ||
+ | "params": { | ||
+ | "1": { | ||
+ | "label": "File name", | ||
+ | "description": "The name of the file on the wiki to be displayed.", | ||
+ | "example": "Tomato Seeds", | ||
+ | "type": "wiki-file-name", | ||
+ | "required": true | ||
+ | }, | ||
+ | "2": { | ||
+ | "label": "Link Page", | ||
+ | "description": "Where this image should link to.", | ||
+ | "example": "Seeds", | ||
+ | "type": "wiki-page-name", | ||
+ | "suggested": true | ||
+ | } | ||
+ | }, | ||
+ | "description": "A large 160px image of a block with an optional page link. Will Default to an untextured block if the resource can't be found and will link to the missing page for that texture so it can be easily uploaded." | ||
+ | } | ||
+ | </templatedata> | ||
+ | [[Category:{{PAGENAME}}]] | ||
+ | </noinclude> |
Latest revision as of 00:04, 4 October 2020
THIS MUST HAVE THE DIV TAGS OR IT NO WORKY!
A large 160px image of a block with an optional page link. Will Default to an untextured block if the resource can't be found and will link to the missing page for that texture so it can be easily uploaded.
Parameter | Description | Type | Status | |
---|---|---|---|---|
File name | 1 | The name of the file on the wiki to be displayed.
| File | required |
Link Page | 2 | Where this image should link to.
| Page | suggested |