imported>RheingoldRiver
Adding default set of pages
 
the mass documenting
 
Line 1: Line 1:
== Summary ==
'''<code>Character icon</code> shows a small character icon next to a link to that character's page — a thin wrapper around {{tl|Link icon}} with the type fixed to "Character".'''
<templatedata>
__TOC__
{
"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 (Character).png\".",
"format": "inline"
}
</templatedata>


== Examples ==
== Overview ==
For the examples below, <code><nowiki>File:Invisible Boy (Character).png</nowiki></code> was used as the icon for a page called <code>Invisible Boy</code>.
This template is shorthand for <code>{{Link icon|...|type=Character}}</code>. It renders the icon image <code>&lt;Name&gt; (Character).png</code> followed by a link to the page of that name. If the icon file does not exist it falls back to a small <code>?</code> placeholder. Pass <code>notext</code> to show only the icon with no text label. '''Note: this template is not currently used on any live page''' — it is documented here for completeness.
 
== Parameters ==
{| class="wikitable"
{| class="wikitable"
! Code !! Result
! Parameter !! Required? !! What it does !! Example
|-
| <code><nowiki>{{Character icon|Invisible Boy}}</nowiki></code> || {{Character icon|Invisible Boy}}
|-
| <code><nowiki>{{Character icon|Invisible Boy|The Invisible Boy}}</nowiki></code> || {{Character icon|Invisible Boy|The Invisible Boy}}
|-
|-
| <code><nowiki>{{Character icon|Invisible Boy|notext}}</nowiki></code> || {{Character icon|Invisible Boy|notext}}
| <code>1</code> (first unnamed) || Required || The character page name. Used both as the link target and to build the icon file name <code>&lt;name&gt; (Character).png</code>. || <code>Valerion</code>
|-
|-
| <code><nowiki>{{Character icon|Missing Boy}}</nowiki></code> (Missing Page Icon) || {{Character icon|Missing Boy}}
| <code>2</code> (second unnamed) || Optional || Display text for the link. If omitted, the page name (param 1) is shown. The special value <code>notext</code> hides the text and shows only the icon. || <code>The Voided King</code>
|}
|}
== Dependencies==
 
For this template to work properly, you need the following:
== How to use ==
* The base {{tl|Link icon}} template.
1. Write <code>{{Character icon|PageName}}</code> to get the character's icon plus a link reading "PageName".
* The <code>.link-icon</code> class and any related classes, found in [[MediaWiki:Common.css]].
2. To show different link text, add it as the second value: <code>{{Character icon|Valerion|The Voided King}}</code>.
3. To show the icon alone (no text), use the literal second value <code>notext</code>: <code>{{Character icon|Valerion|notext}}</code>.
4. The icon image must be uploaded as <code>&lt;PageName&gt; (Character).png</code> (note the space and parentheses). If it is missing, a small <code>?</code> placeholder shows instead, so the link still works.
 
== Copy this ==
<syntaxhighlight lang="wikitext" style="overflow:auto;">
{{Character icon|PageName|display text}}
</syntaxhighlight>
 
== Example ==
{{Character icon|Valerion|The Voided King}}
 
<syntaxhighlight lang="wikitext" style="overflow:auto;">
{{Character icon|Valerion|The Voided King}}
</syntaxhighlight>
 
== Tips & notes ==
* Currently unused on live pages; the example is illustrative.
* The icon file naming rule is strict: <code>&lt;Name&gt; (Character).png</code>, with a literal space before <code>(Character)</code>. A missing file degrades gracefully to a <code>?</code>.
* The text-and-icon link points to the page named in param 1; with <code>notext</code> the icon itself links there.
* This wrapper just sets <code>type=Character</code> on {{tl|Link icon}}; its sibling {{tl|Item icon}} does the same with <code>type=Item</code>.
* Depends on the <code>.link-icon</code> CSS classes in [[MediaWiki:Common.css]].

Latest revision as of 11:55, 20 June 2026

Character icon shows a small character icon next to a link to that character's page — a thin wrapper around {{Link icon}} with the type fixed to "Character".

Overview

This template is shorthand for ? .... It renders the icon image <Name> (Character).png followed by a link to the page of that name. If the icon file does not exist it falls back to a small ? placeholder. Pass notext to show only the icon with no text label. Note: this template is not currently used on any live page — it is documented here for completeness.

Parameters

Parameter Required? What it does Example
1 (first unnamed) Required The character page name. Used both as the link target and to build the icon file name <name> (Character).png. Valerion
2 (second unnamed) Optional Display text for the link. If omitted, the page name (param 1) is shown. The special value notext hides the text and shows only the icon. The Voided King

How to use

1. Write ? PageName to get the character's icon plus a link reading "PageName". 2. To show different link text, add it as the second value: ? The Voided King. 3. To show the icon alone (no text), use the literal second value notext: ?. 4. The icon image must be uploaded as <PageName> (Character).png (note the space and parentheses). If it is missing, a small ? placeholder shows instead, so the link still works.

Copy this

{{Character icon|PageName|display text}}

Example

? The Voided King

{{Character icon|Valerion|The Voided King}}

Tips & notes

  • Currently unused on live pages; the example is illustrative.
  • The icon file naming rule is strict: <Name> (Character).png, with a literal space before (Character). A missing file degrades gracefully to a ?.
  • The text-and-icon link points to the page named in param 1; with notext the icon itself links there.
  • This wrapper just sets type=Character on {{Link icon}}; its sibling {{Item icon}} does the same with type=Item.
  • Depends on the .link-icon CSS classes in MediaWiki:Common.css.