Template:Character link: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
mNo edit summary
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly><span 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>
<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:MdCharLink|Template:LgCharLink}}
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 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.


Line 6: Line 5:


== Examples ==
== Examples ==
{|class="wikitable"
{{Template demo
! Code !! Result
| <nowiki>{{CharLink|Lae'zel|Bae'zel}}</nowiki>
|-
| <nowiki>{{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}}</nowiki>
| <code><nowiki>{{CharLink|Lae'zel|Bae'zel}}</nowiki></code>
| <nowiki>{{CharLink|Volo|w=40}}</nowiki>
| {{CharLink|Lae'zel|Bae'zel}}.
| <nowiki>{{CharLink|Unknown Character}}</nowiki>
|-
}}
| <code><nowiki>{{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}}</nowiki></code>
 
| {{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}}.
== See also ==
|-
* {{tlink|LgCharLink}} - sets the default size to 40 instead of 25
| <code><nowiki>{{CharLink|Volo|w=40}}</nowiki></code>
* {{tlink|MdCharLink}} - sets the default size to 30 instead of 25
| {{CharLink|Volo|w=40}}.
* {{tlink|SmCharLink}} - sets the default size to 20 instead of 25
|-
* {{tlink|ImageCharLink}} - center-aligned large portrait format
| <code><nowiki>{{CharLink|Unknown Character}}</nowiki></code>
| {{CharLink|Unknown Character}}.
|}


== Template data ==
== Template data ==
Line 57: Line 53:
]
]
}
}
</templatedata>
</templatedata>}}
[[Category:Templates]]
[[Category:Templates]]
[[Category:Icon templates]]
[[Category:Link templates]]
</noinclude>
</noinclude>

Revision as of 19:48, 19 January 2025

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}}
Lae'zel Bae'zel
{{CharLink|Auntie Ethel|icon=Portrait Ethel Human.png}}
Auntie Ethel Auntie Ethel
{{CharLink|Volo|w=40}}
Volo Volo
{{CharLink|Unknown Character}}
File:Portrait Unknown Character.png Unknown Character

See also

  • {{LgCharLink}} - sets the default size to 40 instead of 25
  • {{MdCharLink}} - sets the default size to 30 instead of 25
  • {{SmCharLink}} - sets the default size to 20 instead of 25
  • {{ImageCharLink}} - center-aligned large portrait format

Template data

Inserts a link for a character.

Template parameters

ParameterDescriptionTypeStatus
name1

Name of the character

Page namerequired
alias2

Alias for the link text

Stringoptional
iconicon

Specify a different icon

Fileoptional
widthw

Width (and height) of icon

Default
25
Numberoptional