Template:Icon: Difference between revisions

From Paw Borough Wiki
(Edited parameter 1)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>[[File:{{{img|{{{1}}}}}}.png|{{#if:{{{2}}}|{{{2|x20px}}}|x20px}}|link={{#if:{{{link}}}|{{{link|{{{1}}}}}}|}}]]&nbsp;{{#if:{{{link}}}|[[{{{link|{{{1}}}}}}|{{{txt|{{{1}}}}}}]]|{{{txt|{{{1}}}}}}}}</includeonly><noinclude>
<includeonly>[[File:{{{img|{{{1}}}}}}{{#switch:{{{thumb}}}|y|Y|yes|Yes|true|True=&nbsp;Thumbnail}}.png|{{#if:{{{2}}}|{{{2|x20px}}}|x20px}}|link={{#if:{{{link}}}|{{{link|{{{1}}}}}}|}}]]&nbsp;{{#if:{{{link}}}|[[{{{link|{{{1}}}}}}|{{{txt|{{{1}}}}}}]]|{{{txt|{{{1}}}}}}}}</includeonly><noinclude>
 
{{Documentation}}
==Usage==
Use <nowiki>{{Icon}}</nowiki> to create a link with an image: {{Icon|Lunasagi}}. Use |img= for an icon whose file name is different from their pagename. Use |txt= for text that doesn't match the pagename, such as plurals. Leave |link= to remove link, overrides link if not empty.
==Syntax==
<pre>{{Icon|}}</pre>
<pre>{{Icon
|
|
|img=
|txt=
|link=
}}</pre>
 
==Examples==
{{Icon|Scraps}}
<pre>{{Icon|Scraps}}</pre>
{{Icon|food|txt=Food Items}}
<pre>{{Icon|food|txt=Food Items}}</pre>
{{Icon|Lunasagi|x50px}}
<pre>{{Icon|Lunasagi|x50px}}</pre>
{{Icon|biTTer|link=}}
<pre>{{Icon|biTTer|link=}}</pre>
<templatedata>
{
"params": {
"1": {
"description": "The item's name to link to. Default for link and image. Case sensitive for file name.",
"required": true
},
"2": {
"description": "File size.",
"default": "20px"
},
"img": {
"description": "Overrides image. Case sensitive."
},
"link": {
"description": "Leave empty to remove link, overrides link if not empty."
},
"txt": {
"description": "Overrides displayed linked text."
}
}
}
</templatedata>
 
''Modified from [https://flightrising.fandom.com/wiki/Template:Plink Flight Rising Wiki].''
[[Category:Templates]]
</noinclude>
</noinclude>

Latest revision as of 16:41, 23 July 2026

Template documentation follows
Visit Template:Icon/doc to edit this documentation. (How does this work?)
Editors can experiment in this template's sandbox and test case pages.

Usage

Use {{Icon}} to create a link with an image:  Lunasagi. Use |img= for an icon whose file name is different from their pagename. Use |txt= for text that doesn't match the pagename, such as plurals. Leave |link= empty to remove link, overrides link if not empty. Use |thumb= to quickly add "Thumbnail" to the end of a files name, intended for decor/backdrop items whose primary images have awkward dimensions.

Syntax

{{Icon|}}
{{Icon
|
|
|img=
|txt=
|link=
}}

Examples

 Scraps

{{Icon|Scraps}}

 Food Items

{{Icon|food|txt=Food Items}}

 Lunasagi

{{Icon|Lunasagi|x50px}}

 Abyssal Outskirts

{{Icon|Abyssal Outskirts|thumb=y}}

Associated Templates

Template Data

No description.

[Edit template data]

Template parameters

ParameterDescriptionTypeStatus
11

The item's name to link to. Default for link and image. Case sensitive for file name.

Unknownrequired
22

File size.

Default
20px
Unknownoptional
imgimg

Overrides image. Case sensitive.

Unknownoptional
linklink

Leave empty to remove link, overrides link if not empty.

Unknownoptional
txttxt

Overrides displayed linked text.

Unknownoptional
thumbthumb

Adds "Thumbnail" to the end of the images name.

Suggested values
Yes True
Unknownoptional

Modified from Flight Rising Wiki.