From Welcome to Elderfield Wiki
Jump to navigation
Jump to search
Summary
{
"params": {
"1": {
"aliases": [
"page"
],
"label": "Page Name",
"description": "The name for the target page.",
"example": "Page Name",
"type": "wiki-page-name",
"required": true
},
"2": {
"aliases": [
"label"
],
"label": "Link Label",
"description": "The text to the be displayed on the link icon's label.",
"example": "Alternative Page Name",
"type": "line"
}
},
"description": "Use this template to display an icon next to a page link.\n\nThis template assumes that each page has an icon uploaded at a specific location, namely \"File:Page Name (Item).png\".",
"format": "inline"
}
Examples
The examples below use the existing article title. The template looks for
File:Iron Ore (Item).png as the icon for the page
Iron Ore.
| Code | Result |
|---|
{{Item icon|Iron Ore}} | |
{{Item icon|Iron Ore|Iron Ores}} | |
{{Item icon|Iron Ore|notext}} | |
{{Item icon|Missing Item}} (Missing Page Icon) | {{Item icon|Missing Item}} (illustrative missing-icon case) |
Dependencies
For this template to work properly, you need the following:
- The base
{{Link icon}} template. - The
.link-icon class and any related classes, found in MediaWiki:Common.css.