Template:CharLink: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
HiddenDragon (talk | contribs) mNo edit summary |
||
(20 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly><span style="display: inline-block; vertical-align: middle; border: hidden; border-radius:50%; overflow: hidden">{{Icon|Portrait {{{1}}}.png|{{{ | <includeonly><span class="bg3wiki-char-link-icon" style="display: inline-block; vertical-align: middle; border: hidden; border-radius:50%; overflow: hidden; width: {{{w|25}}}px; height: {{{w|25}}}px">{{Icon|{{#if:{{{icon|}}}|{{{icon}}}|Portrait {{{1}}}.png}}|{{{w|25}}}|link={{{1}}}}}</span> [[{{{1}}}|{{{2|{{{1}}}}}}]]{{#ifexist: File:{{#if:{{{icon|}}}|{{{icon}}}|Portrait {{{1}}}.png}} | | {{Main namespace only|[[Category:Pages with missing charlink portraits]]}} }}</includeonly><noinclude>{{documentation|content= | ||
{{see also|Template:SmCharLink|Template:MdCharLink|Template:LgCharLink|Template:ImageCharLink}} | |||
This template creates a link to a character with an accompanying portrait icon. It expects an icon at {{InfoBlob|File:Portrait {Name}.png}}, but this icon file can be overridden with the {{InfoBlob|icon}} field. | |||
This template has an associated maintenance category at [[:Category:Pages with missing charlink portraits]]. | |||
{{CharLink| | == Examples == | ||
{{Template demo | |||
| <nowiki>{{CharLink|Lae'zel|Bae'zel}}</nowiki> | |||
| <nowiki>{{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}}</nowiki> | |||
| <nowiki>{{CharLink|Volo|w=40}}</nowiki> | |||
| <nowiki>{{CharLink|Unknown Character}}</nowiki> | |||
}} | |||
{{ | == Template data == | ||
<templatedata> | |||
{ | |||
"params": { | |||
"1": { | |||
"description": "Name of the character", | |||
"required": true, | |||
"label": "name", | |||
"type": "wiki-page-name" | |||
}, | |||
"2": { | |||
"description": "Alias for the link text", | |||
"label": "alias", | |||
"type": "string" | |||
}, | |||
"icon": { | |||
"description": "Specify a different icon", | |||
"label": "icon", | |||
"type": "wiki-file-name" | |||
}, | |||
"w": { | |||
"description": "Width (and height) of icon", | |||
"label": "width", | |||
"default": "25", | |||
"type": "number" | |||
} | |||
}, | |||
"description": "Inserts a link for a character.", | |||
"paramOrder": [ | |||
"1", | |||
"2", | |||
"icon", | |||
"w" | |||
] | |||
} | |||
</templatedata>}} | |||
[[Category:Templates]] | [[Category:Templates]] | ||
[[Category:Link templates]] | |||
</noinclude> |
Latest revision as of 09:26, 10 September 2024
Template documentation
This template creates a link to a character with an accompanying portrait icon. It expects an icon at File:Portrait {Name}.png, but this icon file can be overridden with the icon field.
This template has an associated maintenance category at Category:Pages with missing charlink portraits.
Examples
Markup | Renders as |
---|---|
{{CharLink|Lae'zel|Bae'zel}} | Bae'zel |
{{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}} | Auntie Ethel |
{{CharLink|Volo|w=40}} | Volo |
{{CharLink|Unknown Character}} | Unknown Character |
Template data
Inserts a link for a character.
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | 1 | Name of the character | Page name | required |
alias | 2 | Alias for the link text | String | optional |
icon | icon | Specify a different icon | File | optional |
width | w | Width (and height) of icon
| Number | optional |