Jump to content
Toggle menu
  • 12,3 E szócikkek
  • 21,5 E fájlok
  • 4 felhasználók
  • 63,9 E szerkesztések
SCWIKI
Toggle preferences menu
Toggle personal menu
Nem vagy bejelentkezve
Your IP address will be publicly visible if you make any edits.

Renders an inline icon link: a small icon followed by a text label, where both the icon and the label link to the same wiki page. Suited to compact, scannable references such as a ship with a thumbnail, a manufacturer with its logo, or a location with a map pin. Wraps Module:IconLink; see the module page for rendering details. For an icon beside plain, non-linking text, use Template:IconText.

Usage

The first positional argument is the target page; icon is the file name of the leading glyph. text overrides the visible label (which defaults to the page name); size sets the icon size; class appends a CSS class to the root span.

Wikitext Result
{{IconLink|Aurora MR|icon=CdxIconArticle.svg}} Aurora MR
{{IconLink|Stanton system|text=Stanton|icon=CdxIconMapPin.svg}} Stanton
{{IconLink|Aurora MR|icon=CdxIconImage.svg|size=16px}} Aurora MR
{{IconLink|Aurora MR|icon=CdxIconArticle.svg|mask=yes}} Aurora MR

Parameters

Renders an inline icon link: a small icon followed by a text label, where both the icon and the label link to the same wiki page. Suited to compact, scannable references such as a ship with a thumbnail, a manufacturer with its logo, or a location with a map pin. Wraps Module:IconLink; see the module page for rendering details. For an icon beside plain, non-linking text, use Template:IconText.

Sablonparaméterek

Ennek a sablonnak ajánlott egy sorba írni a paramétereit.

ParaméterLeírásTípusÁllapot
Link1 link

Target wiki page. Both the icon and the label link here. Alias: `link` (takes precedence over the positional argument).

Példa
Aurora MR
Lapcímkötelező
Iconicon

File name (without the `File:` prefix) of the leading icon.

Példa
CdxIconArticle.svg
Fájlkötelező
Texttext

Visible label. Defaults to the page name.

Példa
Aurora
Karakterláncnem kötelező
Icon sizesize

Icon size, as a MediaWiki image size.

Alap­értelmezett
20px
Példa
16px
Karakterláncnem kötelező
Mask iconmask

Render the icon as a recolorable CSS mask filled with the linked text color, instead of an image.

Alap­értelmezett
false
Példa
yes
Logikainem kötelező
CSS classclass

Extra class appended to the root span.

Példa
my-icon-link
Karakterláncnem kötelező

Behavior

  • The icon and the text sit in a single inline-flex span, so they stay on one line with a small gap and align vertically centered.
  • The icon is rendered with class=metadata, which excludes it from MultimediaViewer; clicking it follows the same link as the text.
  • mask swaps the <img> for a CSS mask filled with background-color: currentColor, so the icon takes on the linked text color. The masked icon stays wrapped in the link. Provide a single-color (for example Codex) icon for the best result.
  • link is an accepted alias for the first positional argument. If both are supplied, link takes precedence.
  • If icon is omitted, or if no link is given, the module raises a script error.

See also