Difference between revisions of "Icon"

m (Removed default link)
m
Line 1: Line 1:
<includeonly><span style="position: relative; top: -2px;"><!-- icon formatting
+
<includeonly><span style="{{#if:{{{3|}}}||position: relative; top: -2px;}}"><!-- icon formatting when default size
 
-->{{#ifexist:File:{{{1}}}<!-- if file exists
 
-->{{#ifexist:File:{{{1}}}<!-- if file exists
 
-->|{{!((}}File:{{{1}}}{{!}}{{{3|20}}}px{{!}}link={{{2|}}}{{!))}}<!-- add 20x20 file with link
 
-->|{{!((}}File:{{{1}}}{{!}}{{{3|20}}}px{{!}}link={{{2|}}}{{!))}}<!-- add 20x20 file with link
 
-->|{{error|No icon was provided. Add an icon parameter.}}}}<!-- handle non-existent file
 
-->|{{error|No icon was provided. Add an icon parameter.}}}}<!-- handle non-existent file
 
--></span></includeonly><noinclude>{{Icon/Documentation}}</noinclude>
 
--></span></includeonly><noinclude>{{Icon/Documentation}}</noinclude>

Revision as of 13:26, 30 September 2023

Description

Adds an inline icon.

Usage

{{Icon|<icon name>|<link>|<size>}}

Parameters

Arrow.png1: The icon file name.
Required.
Arrow.png2: The link that opens when the icon is clicked.
Optional.
Arrow.png3: The size of the icon, in pixels.
Optional. Defaults to '20'.

Errors

No icon was provided. Add an icon parameter.