Template:Icon: Difference between revisions

From Red Faction Wiki
mNo edit summary
(Undo revision 13344 by SimpleArrows (talk))
Tag: Undo
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[Image:{{{1}}}|{{{2|20px}}}|{{{3|link=}}}]]</includeonly><noinclude>
<includeonly>[[Image:{{{1}}} {{#if: {{{2|}}}|{{!}}{{{2}}}|{{!}}20px}}|link={{{3|}}}]]</includeonly><noinclude>[[Category: Inline Templates]]
{{Icon|Icon_RFGMissions.png}}
<templatedata>
{{Icon|Icon_RFGMissions.png|50px}}
{
{{Icon|Icon_RFGMissions.png|60px|Test}}
"params": {
"1": {
"label": "Image",
"description": "The image used for the icon.",
"example": "Icon_RFGSafehouse.png",
"type": "wiki-file-name",
"required": true
},
"2": {
"label": "Size",
"description": "Optional. Size override of the icon.",
"example": "30px",
"type": "number",
"default": "20px"
},
"3": {
"label": "Link",
"description": "The name of the page to link to. By default, the icon cannot be clicked.",
"example": "Parker (Sector)",
"type": "wiki-page-name"
}
},
"description": "Creates a small icon with ease.",
"format": "inline"
}
</templatedata>
<pre>{{Icon|FILE_NAME|SIZE_OVERRIDE|LINK}}</pre>
'''Usage:'''
<pre>{{Icon|Icon_RFGMissions.png}} Missions
{{Icon|Icon_RFGMissions.png|50px}} Missions
{{Icon|Icon_RFGMissions.png||Red Faction: Guerrilla Missions}} Missions</pre>
'''Output:'''<br>
{{Icon|Icon_RFGMissions.png}} Missions<br>
{{Icon|Icon_RFGMissions.png|50px}} Missions<br>
{{Icon|Icon_RFGMissions.png||Red Faction: Guerrilla Missions}} Missions
</noinclude>
</noinclude>

Latest revision as of 13:11, 20 February 2024

Creates a small icon with ease.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Image1

The image used for the icon.

Example
Icon_RFGSafehouse.png
Filerequired
Size2

Optional. Size override of the icon.

Default
20px
Example
30px
Numberoptional
Link3

The name of the page to link to. By default, the icon cannot be clicked.

Example
Parker (Sector)
Page nameoptional
{{Icon|FILE_NAME|SIZE_OVERRIDE|LINK}}

Usage:

{{Icon|Icon_RFGMissions.png}} Missions
{{Icon|Icon_RFGMissions.png|50px}} Missions
{{Icon|Icon_RFGMissions.png||Red Faction: Guerrilla Missions}} Missions

Output:
Icon RFGMissions.png Missions
Icon RFGMissions.png Missions
Icon RFGMissions.png Missions